YAMAMOTO Takashi
dc6b61caf9
fs/romfs/fs_romfs.c: Remove redundant assignments
...
Found by clang-check:
romfs/fs_romfs.c:431:7: warning: Value stored to 'bytesread' is never read
bytesread = 0;
^ ~
romfs/fs_romfs.c:455:11: warning: Value stored to 'sector' is never read
sector += nsectors;
^ ~~~~~~~~
2 warnings generated.
2020-07-30 08:59:46 +02:00
YAMAMOTO Takashi
ba4a7107df
fs/hostfs/hostfs.c: Remove a redundant assignment
...
Found by clang-check:
hostfs/hostfs.c:1081:3: warning: Value stored to 'ret' is never read
ret = OK; /* Assume success */
^ ~~
1 warning generated.
2020-07-30 08:59:46 +02:00
YAMAMOTO Takashi
9dcc6f6da6
fs/driver/fs_blockproxy.c: Fix an error handling
...
Found by clang-check:
driver/fs_blockproxy.c:202:7: warning: Value stored to 'ret' is never read
ret = -errno;
^ ~~~~~~
1 warning generated.
2020-07-29 21:13:20 -07:00
Xiang Xiao
338244dbac
procfs: Get version info from uname instead
...
unify the version into one place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I988fb40d3f460b0291114c60edb04db3aabb38f1
2020-07-30 10:33:08 +09:00
SPRESENSE
e249a2f82f
Makefile: Fix Make.dep not updated by config changes
...
Make.dep file should be updated by .config changed after first make.
There are 2 cases affected for this problem:
1) Add source files by config symbol
2) Include header files in #ifdef directive
These 2 cases may not be included in Make.dep and this may prevent the
differential build from working correctly.
2020-07-28 03:59:45 -05:00
SPRESENSE
89a79b03cf
fs/smartfs: Fix file size corruption when opening with overwriting mode
...
If a existing file is opened with overwriting mode e.g. fopen(file, "w+"),
the file size will be incorrect after writing any data to the file.
This bug is caused by previous commit 10903b5
, and its changes should be
limited to only O_APPEND mode.
2020-07-22 04:22:22 -05:00
Dong Heng
97be116a39
fs/nxffs: Fix scan good block slowly and scan an invalid block
2020-07-20 10:23:58 -03:00
Brennan Ashton
3a58926d01
Cast pointer to uintptr prior to ulong for ioctl
...
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-07-19 15:49:13 -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
67ef70d460
vfs/dirread: Should return the same file type as lstat
...
by extend the possible value of d_type for the special file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-07 13:41:10 +01:00
Xiang Xiao
91ed14c631
vfs/stat: Make the flag defintion more confirm POSIX standard
...
specified here:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-07 13:41:10 +01:00
Xiang Xiao
651eefc8f7
fs: Rename link to symlink
...
since the current implementation is really a symoblic link not hard link
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I59d30d0a620b0b5714fe91bbe90d4405cf53d187
2020-07-01 11:58:12 +02:00
Xiang Xiao
b598ab43d7
fs: Implement lstat function
...
specified here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/lstat.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iefc23a02d425ff84fa4027aea7da1181b01eced7
2020-06-30 13:09:58 -06:00
chao.an
f56e0e004b
fs/setfd: correct the return value
...
Change-Id: I766f3760e7167a579b73673c44b70847ee06850b
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-24 13:48:41 +01:00
Matias Nitsche
8c74a31fe2
vfs: fix support for PTY when CONFIG_NET is not enabled
2020-06-16 09:56:21 +08:00
Peter van der Perk
55d9e5f7af
net: Add SocketCAN support
2020-06-15 08:07:19 -06:00
Gregory Nutt
0f7c2d6fbf
fs/fat: Run all .c and .h files through nxstyle
...
Run all .c and .h files through nxstyle and correct all reported issues.
2020-05-31 12:43:55 -04:00
vau
20615a9f65
Do not rewrite the root directory if it has not changed
2020-05-31 09:08:22 -06:00
Erdem Meydanli
20ef084712
Fix the indentation and spacing that don't conform to the coding standard.
2020-05-28 12:22:23 -06:00
Erdem Meydanli
7f018e7898
fs/nfs/nfs_proto.h: Use of uint64_t in the data types breaks NFS functionality.
...
The use of uint64_t primitive type in NFS structures forces the compiler to align data on an 8-byte boundary.
As a result of this, unwanted gaps being created, which causes NFS to fail. (e.g., nfs_read/initialize the request)
Using nfsuint64 instead of uint64_t fixes this issue.
2020-05-28 12:22:23 -06:00
Gregory Nutt
1c002e1049
fs/vfs/fs_fstat: Correct fstat() for proxied block and MTD drivers.
...
Block and MTD drivers may be opened and managed as though they were character drivers. But this is really sleight of hand; there is a hidden character driver proxy that mediates the interface to the block and MTD drivers in this case.
fstat(), however, did not account for this. It would report the characteristics of the proxy character driver, not of the underlying block or MTD driver.
This change corrects that. fstat now checks if the character driver is such a proxy and, if so, reports the characteristics of the underlying block or MTD driver, not the proxy character driver.
2020-05-28 17:34:09 +01:00
Oleg Evseev
3b75201447
fs/vfs/fs_stat.c: correct style
2020-05-26 16:56:10 +08:00
Oleg
dd9d9878ad
fs/vfs/fs_stat.c: fill file size for mtd inode
...
Now when stat() is calling for mtd device it also set size of file as number of bytes of all sectors related to this mtd device.
2020-05-25 13:53:50 -06:00
Gregory Nutt
fefd893b65
fs/nfs/nfs_util.c: Fix compilation error
...
The build gets broken when both the NFS and DEBUG_FS_ERROR configurations enabled. This tiny change fixes the compilation error.
Run file through nxstyle and correct issues.
NOTE: This line:
/* This logic just supports "//" sequences in the path name */
generates the false alarm error:
fs/nfs/nfs_util.c:84:39: error: C++ style comment
2020-05-25 13:45:28 -06:00
Oleg
e1dbb6b2a9
Update fs/vfs/fs_stat.c
...
Co-authored-by: patacongo <spudarnia@yahoo.com>
2020-05-25 10:10:52 -06:00
Oleg
f6c3296f76
fs/vfs/fs_stat.c: fill file size for block inode
2020-05-25 10:10:52 -06:00
Xiang Xiao
7e5b0f81e9
build: Replace -I with INCDIR
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +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
Xiang Xiao
dd61d3d9f9
build: Remve the unnecessary .gitignore
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Gregory Nutt
154a87993f
fs/vfs/fd_open.c: fs_fdopen() must not set errno
...
Functions within the OS must never set the errno value. fs_fdopen() was setting the errno value. Now, after some parameter changes, it reports errors via a negated errno integer return value as do most all other internal OS functions.
2020-05-23 15:22:09 +08:00
Xiang Xiao
1a95cce1a3
build: Move .config check to the top Makefile
...
remove the workaround to handle the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
Xiang Xiao
5eae32577e
build: Move INCDIROPT to common place
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Gregory Nutt
57bc329aac
Run nxstyle all .c and .h files modified by PR.
2020-05-17 14:01:00 -03:00
Gregory Nutt
a569006fd8
sched/: Make more naming consistent
...
Rename various functions per the quidelines of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
nxsem_setprotocol -> nxsem_set_protocol
nxsem_getprotocol -> nxsem_get_protocol
nxsem_getvalue -> nxsem_get_value
2020-05-17 14:01:00 -03:00
Xiang Xiao
517974787f
Rename clock_systime[r|spec] to clock_systime_[ticks|timespec]
...
follow up the new naming convention:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-10 14:35:50 -06:00
Gregory Nutt
4b44b628ea
Run nxstyle against all .c and .h files modified by this PR.
...
All complaints fixed except for those that were not possible to fix:
- Used of Mixed case identifier in ESP32 files. These are references to Expressif ROM functions which are outside of the scope of NuttX.
2020-05-09 14:19:08 -03:00
Gregory Nutt
a4218e2144
include/nuttx/sched.h: Make naming of all internal names consistent:
...
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 14:19:08 -03:00
Xiang Xiao
b7d922960f
Fix nxstyle issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 07:20:49 -06:00
Xiang Xiao
de33f86ae3
fs: Add nx_mount/nx_umount2 function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 07:20:49 -06:00
Xiang Xiao
4a3d28a957
fs: Move inode_checkflags from include/nuttx/fs/fs.h to fs/inode/inode.h
...
since this function is only used inside fs subsystem
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 07:20:49 -06:00
Xiang Xiao
d9d2fc0d0a
debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-05 08:27:58 -06:00
Xiang Xiao
6604cdb3f2
fs: Remove all LIBC_IOCTL_VARIADIC related stuff
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-05 08:27:58 -06:00
Xiang Xiao
929292f57b
mqueue: Add nxmq_open/nxmq_close/nxmq_unlink function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-04 07:20:02 -06:00
Xiang Xiao
390f9a5fb7
fs/vfs: Add nx_dup and nx_dup2 function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-04 07:20:02 -06:00
Xiang Xiao
1da8cd6b89
fs/vfs: Add nx_poll function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-04 07:20:02 -06:00
Xiang Xiao
4c680bfadc
fs/vfs: Rename fdesc_poll to fs_poll
...
and reorder the function declaration
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
4b5360362e
fs/vfs: Add nx_ioctl/nx_fcntl function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
65308eabb4
fs/vfs: Add nx_stat function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
6418d13b92
fs/vfs: Add nx_close function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
7980673b59
fs/vfs: Add nx_seek function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00