Commit Graph

157 Commits

Author SHA1 Message Date
Juha Niskanen
cd41ed9b6d fs: fully parenthesize MIN and MAX macros
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-08 12:58:40 -06:00
YAMAMOTO Takashi
45444edc16 fs/nxffs/nxffs_write.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
5bead4aa37 fs/nxffs/nxffs_unlink.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
c9d8570040 fs/nxffs/nxffs_reformat.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
78356a7df2 fs/nxffs/nxffs_read.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
e891e0aaa6 fs/nxffs/nxffs_pack.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
0a99d1396e fs/nxffs/nxffs_open.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
da67e80ca9 fs/nxffs/nxffs_inode.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
d0dd04e24a fs/nxffs/nxffs_inode.c: Appease nxstyle 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
942b1e925d fs/nxffs/nxffs_initialize.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
f6ca8bfe45 fs/nxffs/nxffs_dirent.c: Fix a syslog format 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
75d0077cd1 fs/nxffs/nxffs_blockstats.c: Fix syslog formats 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
01e0c41759 fs/nxffs/nxffs_blockstats.c: Appease nxstyle 2020-12-05 08:13:32 -06:00
YAMAMOTO Takashi
ae45a66d70 fs/nxffs/nxffs_write.c: Fix a syslog format 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
d543f7f16f fs/nxffs/nxffs_stat.c: Fix syslog formats 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
7df9d89d54 fs/nxffs/nxffs_reformat.c: Fix syslog formats 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
d28d5a29c2 fs/nxffs/nxffs_reformat.c: Appease nxstyle 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
d22c8a2a31 fs/nxffs/nxffs_read.c: Fix a syslog format 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
3f2390e781 fs/nxffs/nxffs_read.c: Appease nxstyle 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
889c33277c fs/nxffs/nxffs_pack.c: Fix a syslog format 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
660db6b248 fs/nxffs/nxffs_pack.c: Appease nxstyle 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
99407f4ab9 fs/nxffs/nxffs_open.c: Fix a syslog format 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
e1a8f8a736 fs/nxffs/nxffs_open.c: Appease nxstyle 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
35c30c2c4a fs/nxffs/nxffs_cache.c: Fix syslog formats 2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
042881eed3 fs/nxffs/nxffs_cache.c: Appease nxstyle 2020-11-21 19:38:32 -08:00
Brennan Ashton
9393572aea Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"
This reverts commit 97be116a39.

This commit broke nxffs.  This leaves the first block as empty which
then exposes another bug where when the pack is called because we
have reached the end of flash and need to look for deleted inodes
we search the first block find no inode and assume that there
are no more inodes.  This then results in corrupting the filesystem
by writing over existing inodes.

This can be seen by runing the sim:nxffs configuration.
Prior to this commit the first pass of writing files would look like
this:
NXFFS Dump:
  BLOCK:OFFS  TYPE  STATE   LENGTH
      0:5     INODE OK       2680
      0:78    DATA  OK        424
      1:5     DATA  OK        497
      2:5     DATA  OK        497
      3:5     DATA  OK        497
      4:5     DATA  OK        497
      5:5     DATA  OK        268
      5:283   INODE OK       7410
      5:425   DATA  OK         77
      6:5     DATA  OK        497

With this commit:
NXFFS Dump:
  BLOCK:OFFS  TYPE  STATE   LENGTH
      0:0     BLOCK ERASED    512
      1:5     INODE OK       6394
      1:39    DATA  OK        463
      2:5     DATA  OK        497
      3:5     DATA  OK        497

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-19 18:08:41 -08:00
Juha Niskanen
ca7a7ccbeb Fix some typos in comments
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Xiang Xiao
eb4121ce38 Change all 'Nuttx' to 'NuttX'
Unify the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Nathan Hartman
80ce7800a9 Sources and Docs: Fix typos and nxstyle issues
Documentation/contributing/coding_style.rst:

    * Fix repeated words: ("this this").
    * Remove trailing spaces.

boards/z80/z80/z80sim/README.txt:

    * Fix repeated words: ("this this") and rewrap lines.

graphics/Kconfig,
libs/libc/math/Kconfig:

    * Fix repeated words: ("this this").

arch/arm/src/armv7-a/arm_assert.c,
arch/arm/src/armv7-r/arm_assert.c,
arch/arm/src/imxrt/imxrt_enet.c,
arch/arm/src/kinetis/kinetis_enet.c,
arch/arm/src/kinetis/kinetis_flexcan.c,
arch/arm/src/s32k1xx/s32k1xx_enet.c,
arch/arm/src/s32k1xx/s32k1xx_flexcan.c,
arch/arm/src/stm32/stm32_pwm.c,
arch/arm/src/stm32h7/stm32_pwm.c,
arch/arm/src/stm32l4/stm32l4_pwm.c,
arch/renesas/src/rx65n/rx65n_usbdev.c,
binfmt/libnxflat/libnxflat_bind.c,
drivers/pipes/pipe_common.c,
net/igmp/igmp_input.c,
net/tcp/tcp_conn.c,
sched/sched/sched_roundrobin.c:

    * Fix typo in comment ("this this").

arch/arm/src/cxd56xx/cxd56_usbdev.c,
arch/arm/src/lc823450/lc823450_usbdev.c:

    * Fix typo in comment and rewrap lines.

arch/arm/src/imxrt/imxrt_usbdev.c,
arch/arm/src/stm32/stm32_dac.c,
arch/arm/src/stm32f0l0g0/stm32_pwm.c,
arch/arm/src/stm32f7/stm32_pwm.c,
arch/arm/src/tiva/lm/lm4f_gpio.h,
fs/nxffs/nxffs_write.c,
include/nuttx/analog/pga11x.h,
include/nuttx/usb/usbdev.h,
net/mld/mld_join.c:

    * Fix typo in comment ("this this").
    * Fix nxstyle issues.
2020-10-02 04:54:52 +02:00
Dong Heng
97be116a39 fs/nxffs: Fix scan good block slowly and scan an invalid block 2020-07-20 10:23:58 -03:00
Xiang Xiao
9dff16e0e4 fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ieaf325c899d1c349d64dfa15bddcc32afd1fce42
2020-07-10 21:30:02 +01:00
Xiang Xiao
23668a4b9b build: Remove the empty variable assignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Gregory Nutt
2b532ae4a8 fs/: Remove support for CONFIG_FS_READABLE 2020-03-22 08:24:07 -05:00
Gregory Nutt
7a871e2f29 fs/: Remove support for CONFIG_FS_WRITABLE 2020-03-22 08:24:07 -05:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao
bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao
5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao
68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
patacongo
f00569816f Fix a few errors concerning use of section block comments in .c files: (#95)
1. No .c file should include a "Public Types" section.  Only a header file can define a public type.  A .c file can only define a private type.  Several files contained private type definitions.  The section that they were defined in, however, was incorrectly named "Public Types."  Those were easilty changed to "Private Types" which is what they are.

2. No .c file should include a "Public Function Prototypes" section.  All global function prototypes should be provided via a header file and never declared with a .c file.

For No. 2, I corrected as many cases as was reasonable for the time that I had available.  But there are still a dozen or so .c files that declare "Public Function Prototypes" within a .c file.  This is bad programming style.  These declarations should all be moved to the proper header files.
2020-01-14 00:37:54 +01:00
Nathan Hartman
9655730ef8 Fix various typos and spelling errors. 2019-12-12 07:41:51 -06:00
Gregory Nutt
d2af57169b tools/nxstyle.c: Fix a rare false alarm that could occur if a variable or function name begins with the sub-string 'union' or 'struct'. misc fixes under fs/ and sched/ from application of current version of nxstyle. 2019-12-01 13:01:16 -06:00
Gregory Nutt
bd3cc792ff fs/: Run all .c files under fs/ through tools/nxstyle. 2019-10-27 11:48:14 -06:00
Juha Niskanen
ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Gregory Nutt
035842b3ed Fix an error and more warnings found in build testing. 2019-05-25 12:13:27 -06:00
Gregory Nutt
be3dd0bac6 fs/: Fix various coding standard issues found while testing tools/nxstyle.c 2019-03-01 15:01:04 -06:00
Daniel P. Carvalho
60575d3436 fs/nxffs/nxffs_ioctl.c: Pass unrecognized IOCTL commands to the contained MTD driver. 2018-12-12 18:23:03 -06:00
Gregory Nutt
1273f727c0 File System IOCTLs: Three new IOCTLS were added for SPIFFS, two of which were duplicates. 2018-09-27 12:25:23 -06:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt
ed18e427f3 Squashed commit of the following:
configs/flipnclick-sam3x:  Add support for the 4 user-controllable LEDs on the board.
    configs/flipnclick-sam3x:  Add board support for the Mikroe Flip&Click SAM3X.
    configs/arduino-due:  Update this old configuration so that it is structured a little more like recent board support.
2018-01-06 17:06:50 -06:00