Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution: Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly. This commit is only for those files under fs/driver, fs/aio, fs/nfs, crypto/, and boards/.
Please note: The modified file under fs/nfs generates several " Mixed case identifier found" errors. Please ignore these. These cannot be fixed without changes to numerous other files. They also follow a non-standard convention that is used many files: Using lower case structure names in custom SIZEOF_ definitions.
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution: Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly. This commit is only for those files under fs/inode. Utility functions under fs/incode were modified so the changes do extend to other fs/ sub-directories as well.
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution: Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly. This commit is only for those files under fs/tmpfs and fs/spiffs. Still do do: The rest of fs/ and all of drivers/ and arch/.
This reverts commit b9ace36fcc.
This change was added by PR 625 but has a serious logic flaw. It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:
else ifeq ($(WINTOOL),y)
DEFINE = "$(TOPDIR)/tools/define.sh"
INCDIR = "$(TOPDIR)/tools/incdir.sh" -w
This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined. As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
* fs/nfs: Remove all nfs_checkmount call. The check just waste cpu cycle since nobody will set nm_mounted to false, and remove the unused fields(nm_mounted and n_flags) and related flags too
* fs/nfs: Fix the definition not confirm to RFC 1813 and other minor issue(unused, typo, duplication, alignment...)
* fs/nfs: Always represent error with negative number and remove the unused arguments from function
* fs/nfs: Set socket receive timeout with nfs_args->timeo and fix warning:
nfs/nfs.h:59:28: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
^
nfs/nfs_vfsops.c:1857:23: note: in expansion of macro 'NFS_TIMEO'
nprmt.timeo = NFS_TIMEO;
^
^~~~~~~~~
* fs/nfs: Update the file attribute correctly in nfs_filetruncate and simplify the attrbitue conversion between NFSv3 and NuttX
* fs/nfs: Remove the unfinished and buggy EXCLUSIVE creation mode
* fs/nfs: Call nfs_fsinfo in nfs_bind instead of nfs_statfs since we should update the buffer size before transfer happen, and handle the attribute existence variance correctly.
* fs/nfs: Shouldn't insert node into list again in nfs_dup and fix other typo issue
* fs/nfs: Should skip . and .. in nfs_readdir
* fs/nfs: Remove the unnecessary dynamic allocation and the duplicated root handle storage
Author: Alan Carvalho de Assis <acassis@gmail.com>
Run nxstyle against .c and .h files and fix it
Author: Juha Niskanen <juha.niskanen@haltian.com>
Fix typos and some incorrect comments
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.
Here is the email loop talk about why it is better to remove the option:
https://groups.google.com/forum/#!topic/nuttx/AaNkS7oU6R0
Change-Id: Ib66c037752149ad4b2787ef447f966c77aa12aad
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Author: Alan Carvalho de Assis <acassis@gmail.com>
Check all .c and .h against nxstyle and fix it.
Author: Alin Jerpelea <alin.jerpelea@sony.com>
fs: smartfs: Fix over capacity write
When the remaining capacity of flash is one sector, if a new root
directory is created by file open, then the root directory's chain is
broken and it causes to SmartFS filesystem crash. Once this fatal
problem occurs, it's impossible to recover even if the system reboot.
Fix it by finally update link of root directory.
fs: smartfs: Fix buffer overrun
fs: smartfs: Fix uninitialized variable warnings
fs: smartfs: Memory leak fix
boards: cxd56xx: Update spresense board.h
- Fix PMIC assignment
- Add specific pin configurations for spresense
- Remove unnecessary definitions
arch: cxd56xx: Add ITM syslog init at startup
arch: cxd56xx: Enable DMA settings dynamically
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
1.merge CONFIG_GIT_REVISION_STR into CONFIG_VERSION_BUILD
2.merge gen_getrev.sh into version.sh
3.generate version number if needed
Here is a sample output:
nsh> uname -a
NuttX 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:00 sim sim
nsh> cat /proc/version
NuttX version 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:01