Commit Graph

48 Commits

Author SHA1 Message Date
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
Oxore aeebbd0803 fs_tmpfs.c: Shorten long lines according to codestyle 2020-04-30 01:04:33 -07:00
Oxore 1dcf2c7ca3 tmpfs: Fix tmpfs_foreach recursively removing files in directories
Fixes #912
2020-04-30 01:04:33 -07:00
hartmannathan bfc153ca27
Fix typos in comments and documentation (#750)
* Fix typos in comments and documentation
2020-04-08 06:45:35 -06:00
Gregory Nutt 156963a903 Check return from nxsem_wait_initialize()
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/.
2020-03-29 22:11:13 +01: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 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 6a3c2aded6 Fix wait loop and void cast (#24)
* 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
2020-01-02 10:54:43 -06:00
Gregory Nutt bd3cc792ff fs/: Run all .c files under fs/ through tools/nxstyle. 2019-10-27 11:48:14 -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
Gregory Nutt 8c61c2f31b Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06:00
Gregory Nutt a704344595 fs/tmpfs/fs_tmpfs.c: Correct logic in tmpfs_ioctl() that extracts the priv state structure from the file system structures. It was not getting the right value and causing mmap() to fail. Noted by Jesse. 2018-07-24 06:00:40 -06:00
Gregory Nutt e4652bd3dc Squashed commit of the following:
fs: Add truncate() support for userfs
    fs/unionfs:  Add truncate() support to the unionfs
    fs/tmpfs:  Add ftruncate() support to tmpfs
    syscall/: Add system call support for ftruncate()
    net/route:  Adding ftruncate() support eliminates an issue in file-based routing table management.
    fs:  Add basic framework to support truncate() and ftruncate().  The infrastructure is complete.  Now, however, the actual implementation of ftruncate() will have to be done for each file system.
2018-01-03 16:03:56 -06:00
Gregory Nutt 9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt 42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt 83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
DL 9145fe0c10 Fixed directory unlocking in tmpfs_opendir 2017-09-27 06:55:37 +03:00
Gregory Nutt 41680d376d Replace 'the the' with 'the' 2017-05-11 13:15:13 -06:00
Gregory Nutt a482a4603f fstat: Add fstat() support to tmpfs. 2017-02-13 07:20:39 -06:00
Gregory Nutt 7d91fabf01 fstat: Add skeleton implmentations of fstat() in all file systems. 2017-02-12 13:42:27 -06:00
Gregory Nutt 67a9549355 TMPFS: Eliminate some warnings 2016-07-11 11:19:58 -06:00
Gregory Nutt ad2f7b0119 fs/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. 2016-06-11 17:14:02 -06:00
Gregory Nutt a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt 9008308b64 Remove some block comments before empty code sections 2016-04-11 18:16:04 -06:00
Gregory Nutt 185b941c27 TMPFS: In open write/append mode, need to set the file position to the end of the file 2015-10-11 10:29:35 -06:00
Gregory Nutt 2c385b81f8 TMPFS: Yet another memory leak 2015-10-10 18:39:43 -06:00
Gregory Nutt 6a2098d35c TMPFS: Fix a memory leak 2015-10-10 18:01:14 -06:00
Gregory Nutt 838f9e5a18 TMPFS: Fix yet another bug 2015-10-10 17:04:38 -06:00
Gregory Nutt d6fa78a1b0 TMPFS: Fixes several bugs 2015-10-10 15:26:07 -06:00
Gregory Nutt f0be2b7b09 TMPFS: Fix error in reallocted directory 2015-10-10 14:15:33 -06:00
Gregory Nutt e675ddb813 TMPFS: Reported block size is now configurable 2015-10-09 16:57:48 -06:00
Gregory Nutt d80bea326f TMPFS: Fix a misbehaving assertion 2015-10-09 15:56:16 -06:00
Gregory Nutt b489cd9610 TMFPS: Now basically functional although not heavily tested 2015-10-09 15:17:32 -06:00
Gregory Nutt c25adcb74c TMPFS: More fixes 2015-10-09 13:33:28 -06:00
Gregory Nutt 9eb92268b7 TMPFS: Fixes a few bugs. Still not fully functional 2015-10-09 12:13:57 -06:00
Gregory Nutt d359a5be13 TMPFS: Code complete, but not yet functional 2015-10-09 11:02:59 -06:00
Gregory Nutt 11a8a01462 TMPFS: Add mkdir and rmdir logic 2015-10-08 20:35:41 -06:00
Gregory Nutt fcb55102f9 TMPFS: Add statfs and unbind methods 2015-10-08 18:27:20 -06:00
Gregory Nutt fe4cf00ad3 TMPFS: A little more logic. Still incomplete 2015-10-08 16:48:49 -06:00
Gregory Nutt 6209c51206 net/: More clean-up of spacing/alignment issues 2015-10-08 15:10:04 -06:00
Gregory Nutt 1e6ffe7677 TMPFS update 2015-10-08 14:21:12 -06:00
Gregory Nutt cc35c0c49d Add toosl/nxstyle.c 2015-10-08 12:48:40 -06:00
Gregory Nutt e91f82b0f8 fs/tmpfs: Add an unfinished implementation of tmpfs 2015-10-08 12:26:35 -06:00
Gregory Nutt e947ea587d Add fs/tmpfs. Nothing much there yet 2015-10-08 10:54:41 -06:00