Commit Graph

1593 Commits

Author SHA1 Message Date
Xiang Xiao
7053707e0a fs/tmpfs: Handle the tail '/' correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia2beeaced2de9c38afefd92a2ddc13dfb4919c45
2021-07-18 10:25:54 -03:00
Xiang Xiao
663104a2e9 fs: Simplify sendfile implementation
and avoid call nx_ file API in the kernel space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id951ca161df2c2ee267dc4b5a0d7dfa67df4c1e6
2021-07-17 07:39:15 -03:00
Xiang Xiao
2e0901fcaa net: Add file_socket function
and move the socket special process from fstat/nx_vfcntl/ to file_fstat/file_vfcntl

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10341538488ba3a8444df8e73fb5257b2a1f512
2021-07-17 07:39:15 -03:00
Xiang Xiao
a44f62ddf7 fs: should only apply umask to the userspace caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I608e3107aaf3d85045958163a742a1ef1107de91
2021-07-17 13:58:58 +09:00
Xiang Xiao
a0f2f6c362 fs: Move umask to task_info_s
and implement the related semantic correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0587341e2c505e41b5e24e55dba039ed200d65f2
2021-07-14 10:35:15 -03:00
Xiang Xiao
0148e1d501 fs: Support the root file system attributes(mode, uid, gid and time)
Note: all attributes is guarded by PSEUDOFS_ATTRIBUTES to save the space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664d60382e356068fd920f08aca5b4a49d8d92a9
2021-07-14 10:35:15 -03:00
Xiang Xiao
1f3a8b5adf Fix mmap compiler error when CONFIG_FS_RAMMAP equals y
fs_munmap.c:122:15: error: ‘struct fs_rammap_s’ has no member named ‘kernel’
fs_rammap.c:110:52: error: expected ‘:’ before ‘;’ token

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-13 14:39:14 -03:00
Xiang Xiao
30135b5f18 vfs: stat_recursive should return -ENOSYS if stat callback is NULL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic342b6fff112d24c7355ddc8aa0937dfc544f1b4
2021-07-13 11:32:52 -03:00
Xiang Xiao
d539998446 fs: fstat shouldn't follow the symbol link
since the decision is already done at open time(from path to fd)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idc1df3c1d7fe60927b0643173f3f40895aaffd4c
2021-07-13 10:05:50 -03:00
Xiang Xiao
c3c4053263 fs/profs: Add ordblks in meminfo_progmem
forget in commit:
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Wed Apr 28 11:05:20 2021 +0800

    cmd/free: add nused/nfree field in command free

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
Xiang Xiao
7ef29ecce6 profs: Print StackAlloc by procfs_snprintf
since snprintf return the wrong number in case of insufficient buffer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
hujie1
025bddfc6c nuttx: littlefs_close should return value bugfix
N/A

Change-Id: I5fea016fe01ac0e87ddeabdae67d36ab4125ea55
2021-07-12 10:05:49 -03:00
Jiuzhu Dong
9b1f554429 sched: Dynamically extend the pid hash table
Change-Id: I3a719bc575cd408cd530a39efa203f507b44fa9c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Xiang Xiao
2fa1e55628 libc: Implement ttyname and ttyname_r
Note: this patch can get file path from root pseudo file handle,
but a general infrastructure is setup for other file system too.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I86cd79ebb741f2f43fdd398bb7498c40687d949b
2021-07-09 18:23:34 -03:00
zhouliang3
b7653e2fae fs: Add parent node of inode
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: I006c6172ced8edd47b9d4661880e04d3a4274854
2021-07-09 18:23:34 -03:00
Xiang Xiao
ee767021b3 fs: Remove the inernal st_count field from struct stat
it's more simple to reuse the resolve argument as the recursive count

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I826b2fef3af8b12aae230e4766ab09f8de988f8a
2021-07-09 16:38:51 -03:00
Xiang Xiao
643ee82e9c fs: pseudorename should call inode_release in the error path
to avoid the memory leak

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8f7e4c8fb89188614d03dcf383a1707f25c65174
2021-07-09 15:18:32 -03:00
Xiang Xiao
13651cde99 fs: Move the default ioctl handle from nx_vioctl to file_vioctl
ensure the behaviour is same in all ioctl function variant

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie67cfbc579004c8488ef5004c9be7fb179e77041
2021-07-08 09:17:04 -03:00
Xiang Xiao
d5c1979aad fs/procfs: layout the output of meminfo correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic30e70772e19a43e2ad3b298e3ba1ac77f2f2219
2021-07-06 05:39:02 -07:00
Xiang Xiao
8612af4ae5 fs: Implement file_mmap and file_munmap API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 11:18:13 +09:00
Xiang Xiao
2b0b298ab6 fs/mmap: Remove rammap_initialize declaration
Forget in patch:
commit ec30d6ef6b
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Thu Jun 24 01:42:11 2021 +0800

    fs: Initialize fs_allmaps_s::exclsem in declaration directly

    and then remove rammap_initialize and caller

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 11:18:13 +09:00
Xiang Xiao
7b54b7502c fs/tmpfs: Account the filename in the allocation block
and caclulate the available block more accurately

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia6382239f422970771ccefbd6e461241a5f995a5
2021-07-04 18:51:12 -03:00
Xiang Xiao
6a09ed09f1 fs/tmpfs: Remove the temporary strdup in all place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I224cc9d4ec5fd08937f9f2ddfff022866090be29
2021-07-04 18:51:12 -03:00
Xiang Xiao
c406e03cfe fs/tmpfs: Fix the memory corruption when reallocate tmpfs_directory_s
since it's hard to adjust all childern to point back the new parent
location. Let's allocate the dynamical part(e.g. tdo_entry) separately
and remove the back pointer.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I53afb8336360b7845bd8ecb5aa908acea20e7797
2021-07-04 18:51:12 -03:00
Nathan Hartman
ce20211357 Fix various typos in comments and documentation
Fix typos in these files:
    * Documentation/components/drivers/character/foc.rst
    * Documentation/guides/cpp_cmake.rst
    * Kconfig
    * arch/arm/src/imxrt/imxrt_lpspi.c
    * arch/arm/src/kinetis/kinetis_spi.c
    * arch/arm/src/kl/kl_spi.c
    * arch/arm/src/lpc31xx/lpc31_spi.c
    * arch/arm/src/nrf52/nrf52_radio.h
    * arch/arm/src/s32k1xx/s32k1xx_lpspi.c
    * arch/arm/src/stm32/Kconfig
    * arch/arm/src/stm32/stm32_adc.c
    * arch/arm/src/stm32/stm32_foc.c
    * arch/arm/src/stm32/stm32_foc.h
    * arch/arm/src/stm32/stm32_pwm.c
    * arch/arm/src/stm32/stm32_spi.c
    * arch/arm/src/stm32f0l0g0/stm32_spi.c
    * arch/arm/src/stm32f7/Kconfig
    * arch/arm/src/stm32f7/stm32_spi.c
    * arch/arm/src/stm32h7/Kconfig
    * arch/arm/src/stm32h7/stm32_allocateheap.c
    * arch/arm/src/stm32h7/stm32_fmc.c
    * arch/arm/src/stm32h7/stm32_fmc.h
    * arch/arm/src/stm32h7/stm32_pwm.c
    * arch/arm/src/stm32h7/stm32_qspi.c
    * arch/arm/src/stm32h7/stm32_spi.c
    * arch/arm/src/stm32l4/stm32l4_pwm.c
    * arch/arm/src/stm32l4/stm32l4_spi.c
    * arch/arm/src/stm32l5/Kconfig
    * arch/arm/src/stm32l5/stm32l5_spi.c
    * arch/renesas/src/rx65n/rx65n_dtc.c
    * arch/renesas/src/rx65n/rx65n_usbdev.c
    * arch/risc-v/src/rv32m1/rv32m1_serial.c
    * boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c
    * boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c
    * boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c
    * boards/arm/stm32h7/nucleo-h743zi2/README.txt
    * boards/risc-v/rv32m1/rv32m1-vega/README.txt
    * boards/sim/sim/sim/scripts/Make.defs
    * drivers/1wire/1wire.c
    * drivers/1wire/1wire_internal.h
    * drivers/lcd/Kconfig
    * drivers/syslog/ramlog.c
    * fs/fat/Kconfig
    * libs/libc/debug/Kconfig
    * libs/libc/machine/Kconfig
    * libs/libc/stdio/lib_libvsprintf.c
    * libs/libc/stdlib/lib_div.c
    * libs/libc/stdlib/lib_ldiv.c
    * libs/libc/stdlib/lib_lldiv.c
    * libs/libdsp/lib_observer.c
2021-07-04 11:23:26 -05:00
GAEHWILER Reto
38eadbb575 FAT32 kconfig entry to enforce computation of free clusters at mount
Follow up commit for [1] in response to the request to make the mount
behaviour configurable whether the number of free clusters is read
from the fsinfo section or computed (as the white paper suggests).

Default is the original behaviour of NUTTX, just read fsinfo.

[1] https://github.com/apache/incubator-nuttx/pull/3760
2021-07-04 08:26:11 -05:00
ligd
6d3ccf37ab fs: move out nx_close from filelock
If the close is blocked(like net close timeout 5s),
then other file operation can't access in this 5s.

Change-Id: Ia6c4ec88d90db0330134d0aaa30e94cb71c8a066
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-03 07:25:51 -05:00
ligd
2d32a52353 sched_critmon: add thread run time to critmonitor
Change-Id: Ib44e45f0f9a1b249b4067db324c9dbdf0cf3f288
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
ligd
dbdb24e2e0 procfs: fix cat status error when meet long thread name
nsh> cat /proc/3/status
Name:       init123456789987654Type:       Task
Group:      3
State:      Running

Change-Id: Iddef8fa1fe3a02d407244f46fa05e3f35dd7c84e
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
ligd
2c775bb0c9 fs/procfs: fix heap overflow when snprintf meet long string
Change-Id: I90f2d9fab55b6e69f159855af3d6dbcb81142eb8
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
Jiuzhu Dong
554310bd78 fs/fs_dup2: correct check before dup
Change-Id: I2387ab447f0d8ed9429960922a72de35b2730acb
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-02 04:54:43 -05:00
Jiuzhu Dong
f57ba35151 fs/procfs: add StackAlloc field for task stack info
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-02 04:51:55 -05:00
Xiang Xiao
06215be327 mmap: Implement the minial but reasonable mlock/munlock/mprotect
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I538e0d78ecd0680374a2e0f56adbc61d7a4e6d1f
2021-07-01 08:06:54 +09:00
Xiang Xiao
ec30d6ef6b fs: Initialize fs_allmaps_s::exclsem in declaration directly
and then remove rammap_initialize and caller

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ife9f04d409b3a14a3be4bbb61c23da6e7a9f8a3d
2021-07-01 08:06:54 +09:00
Masayuki Ishikawa
abc2767b0d fs: nfs: Reconnect to the NFS server in TCP mode
Summary:
- I noticed that an NFS connection is automatically dropped.
- Actually, this happens in TCP mode if no traffic happens
  for 600 seconds.
- I confirmed that the NFS client on Ubuntu automatically
  reconnects to the NFS server when an RPC call failed.
- This commit adds the same behavior to fix the issue.

Impact:
- NFS client in TCP mode

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-28 01:11:52 -05:00
Xiang Xiao
ae9b5fd306 Replace mktime with timegm in rtc and fs driver
since kernel component should use UTC instead local time

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf939e1ab0af8e577105f539d2553bc67b3b3d10
2021-06-23 13:43:32 -03:00
Xiang Xiao
2e49e1bc5c mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE
since the old design reuse BIOC_FLUSH for
MTD device which make some confusion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-15 13:26:45 -03:00
chao.an
0d8e5b66fd net/sock: move the psock calloc out of sockfd_allocate
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-11 05:00:21 -05:00
Xiang Xiao
5b2a17b892 Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-08 13:06:08 -07:00
Xiang Xiao
2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Xiang Xiao
d7f96003cf Don't include debug.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
Alin Jerpelea
75797039fb fs: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-27 08:07:25 +09:00
GAEHWILER Reto
104bbc50e7 Fix skipping sectors at computing the number of free clusters
Double increment of sector made computation skipping every second sector
and to go beyond fat-table!
2021-05-26 11:36:12 -07:00
Jiuzhu Dong
fea1da2f53 cmd/free: add nused/nfree field in command free
Change-Id: I74aa4b1e7394a17c3b117322a4cc24aa52aac3b8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-25 01:01:38 -07:00
GAEHWILER Reto
fc55f25fff Fix calculation of free clusters at mounting a fat partition
Previously the value of the FSInfo section was taken as granted.
As described in the white paper of FAT [1] this value is unreliable
and has to be computed at mount time.

    [1] https://www.win.tue.nl/~aeb/linux/fs/fat/fatgen103.pdf
2021-05-21 09:54:30 -03:00
SPRESENSE
0cc0c3d503 fs/vfs: Fix bug that select() did not return
Fix bug that select() did not return when the nfds argument
was set to a negative value. The specification is that -1 is
set to the return value and EINVAL is set to errno.
2021-05-19 06:43:22 -05:00
Jukka Laitinen
105f305b1b fs/fat/fat32util.c: Fix calculation of current sector with invalid cluster
If the current cluster is invalid, don't use the error code for calculating
the sector number. Instead just return the error code.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-19 03:06:34 -05:00
Jiuzhu Dong
9980a1c27d fs/hostfs: fix bug about getting error file size by fstat
Change-Id: I10a0d52da649e4c3138e5a2301bcb6525e2e3350
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-16 01:13:09 -07:00
Masayuki Ishikawa
e1b14271c8 fs: nfs: Do not bind to a local port in TCP mode
Summary:
- Since binding to a local port is not necessary in TCP mode,
  it should be done only in UDP mode

Impact:
- None

Testing:
- Tested with NFS server on Ubuntu 18.04 (x86_64)
- Tested with spresense:rndis (defconfig will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-05-13 22:33:12 -03:00
Masayuki Ishikawa
2873f33bc4 fs: nfs: Fix to read a large packet in TCP mode
Summary:
- I noticed that receiving a read large packet (e.g. 2KB) in TCP
  mode does not work correctly
- Actually, rpcclnt_receive() only received up to MSS
- This commit fixes this issue

Impact:
- TCP mode only

Testing:
- Tested with Ubuntu 18.04 (x86_64)
- Tested with spresense:rndis (defconfig will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-05-13 22:33:12 -03:00
Masayuki Ishikawa
f0372dde6a fs: nfs: Fix rpcclnt_send() in TCP mode
Summary:
- I noticed that NFS over TCP does not work with Ubuntu 18.04
- Finally, I found that the record marking packet should not
  be sent separately
- This commit fixes this issue

Impact:
- TCP mode only

Testing:
- Tested with NFS server on Ubuntu 18.04 (x86_64)
- Tested with spresense:rndis (defconfig will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-05-13 22:33:12 -03:00
Simon Piriou
87375ae2ac fs/eventfd: add EVENT_FD_POLL as a Kconfig dependency for EVENT_FD_NPOLLWAITERS 2021-05-08 08:29:21 -07:00
David Sidrane
22b719945f fs:cromf Use inttypes in printing macros 2021-05-04 09:40:51 +01:00
chao.an
58bd0468ab fs/inode: correct the return value
correct the return value of fs_getfilep() since the
semaphore take may probably fail if the thread canceled

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-04-19 09:50:45 +01:00
Xiang Xiao
2335b69120 arch: Allocate the space from the beginning in up_stack_frame
arch: Allocate the space from the beginning in up_stack_frame

and modify the affected portion:
1.Correct the stack dump and check
2.Allocate tls_info_s by up_stack_frame too
3.Move the stack fork allocation from arch to sched

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-16 12:41:41 +09:00
Alin Jerpelea
08612337f6 NuttX: nxstyle fixes
nxstyle fixes to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-10 06:42:19 -05:00
Alin Jerpelea
231b8518b7 NuttX: Ken Pettit: update licenses to Apache
Ken Pettit has submitted the ICLA and we can migrate the licenses
 to Apache.

Sebastien Lorquet has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-10 06:42:19 -05:00
wangshuo
cb54c838a0 vfs: adjust the error code of write to be consistent with read
According to POSIX, the EACCES will be set when file can not be
written access. Just like fs_read
2021-04-08 21:52:14 -05:00
liuhaitao
dc14f89909 fs/romfs: fix open zero-byte file fail issue
N/A

Error log as below:
romfs_open: ERROR: Failed to locate start of file data: -5

Change-Id: I0594a84b727077606450dea3ea348cfc2390458b
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-04-07 00:57:08 -05:00
Xiang Xiao
866fe646aa vfs/lfs: Simplify the lookahead_size equation
the final result is same(keep 8 bytes alignment)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664879960c898a7f1518236b24a2b3ee8a9998d0
2021-04-03 21:00:41 +01:00
Xiang Xiao
9f44417de4 fs/lfs: Update version to 2.4.0
And redirect assert and log to NuttX's version
which is possible after:
commit c0cc0a417e727764ccce6f1284e3570898d750e6
Author: Christopher Haster <chaster@utexas.edu>
Date:   Mon Jan 18 14:01:53 2021 -0600

    Enabled overriding of LFS_ASSERT/TRACE/DEBUG/etc

    This is useful for testing the new erroring assert behavior in CI.
    Asserts do not error by default, so this macro needs to be overriden.

    It is possible to test this behavior using the existing option of
    overriding lfs_util.h with a custom file, by using a small sed
    one-line script. But this is much simpler.

    This does raise the question if more of the configuration options in
    lfs_util.h should be opened up for function-like macro overrides.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie70814e1a2777e19a7310358d3a94ff965287d7b
2021-04-03 21:00:41 +01:00
Alin Jerpelea
7dc5db49fc fs: nxstyle fixes
Fix for several errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:37:06 -05:00
Nathan Hartman
c869bc5348 docs and comments: Update stale references to COPYING
Since 7a046358d9 the top-level COPYING
file has been deleted and replaced by DISCLAIMER, LICENSE, and NOTICE
files. However, some references to the old COPYING file remained in
Kconfig help text and documentation.

Documentation/contributing/coding_style.rst:
Documentation/introduction/about.rst:
boards/arm/lpc17xx_40xx/olimex-lpc1766stk/README.txt:
boards/arm/sam34/arduino-due/README.txt:
boards/arm/sam34/sam4l-xplained/README.txt:
boards/arm/sama5/giant-board/README.md:
boards/arm/sama5/sama5d2-xult/README.txt:
boards/arm/sama5/sama5d4-ek/README.txt:
boards/arm/samd2l2/samd20-xplained/README.txt:
boards/arm/samd2l2/samd21-xplained/README.txt:
boards/arm/samd2l2/saml21-xplained/README.txt:
boards/arm/stm32/hymini-stm32v/README.txt:
boards/arm/stm32/stm3210e-eval/README.txt:
fs/fat/Kconfig:
libs/libc/string/Kconfig:

    * Updates stale references to the old top-level COPYING file to
      either LICENSE or NOTICE (or both), as appropriate in each
      instance.
2021-04-01 21:10:56 -05:00
Chen Wen
3a71d5a714 fs/spiffs: Fix syslog formats 2021-03-30 12:29:11 -05:00
Xiang Xiao
b2563b99ca fs/littlefs: Suppport the duplication function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I64191bdeab3723b22476d27c44852493eed1b07e
2021-03-23 08:34:09 +01:00
chao.an
4abf8e6587 fs/epoll: correct the return value of epoll_ctl(2)
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-23 00:28:18 -07:00
Nathan Hartman
4653dc14d3 Fix typos (and nxstyle errors)
ReleaseNotes,
arch/arm/src/cxd56xx/cxd56_dmac_common.h,
arch/arm/src/efm32/efm32_dma.h,
arch/arm/src/lpc54xx/lpc54_lcd.c,
arch/arm/src/rp2040/rp2040_dmac.h,
arch/arm/src/stm32/stm32_dma.h,
arch/arm/src/stm32f0l0g0/stm32_dma.h,
arch/arm/src/stm32f7/stm32_dma.h,
arch/arm/src/stm32h7/stm32_dma.h,
arch/arm/src/stm32l4/stm32l4_dma.h,
arch/renesas/src/rx65n/rx65n_dtc.h,
fs/spiffs/src/spiffs_vfs.c,
net/route/cacheroute.h,
net/route/net_cacheroute.c,
net/route/net_foreach_fileroute.c,
net/route/net_foreach_ramroute.c,
net/route/net_foreach_romroute.c, and
net/route/route.h:

    * Fix the following typos:
      - remove spurious "are"
      - "tot he" -> "to the"

arch/arm/src/stm32f0l0g0/stm32_dma.h and
arch/arm/src/stm32l4/stm32l4_dma.h:

    * Fix nxstyle errors.
2021-03-21 21:51:14 +01:00
Jiuzhu Dong
e96c8b9283 fs: allocate file/socket dynamically
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
Jiuzhu Dong
cf61df9c5f fs/aio: unify socket into fs operate
Change-Id: I3aa88a47d88feaa7fd156caea9e0425b20554eee
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
YAMAMOTO Takashi
5652de3fdf fs: try blockproxy only if BCH is enabled 2021-03-17 01:25:16 -07:00
Gustavo Henrique Nihei
c80cdf06c2 fs/mmap: Return EACCES for incompatible file descriptors 2021-03-16 10:17:07 -07:00
Gustavo Henrique Nihei
ecb9e03a7f fs/mmap: Update mmap documentation of possible return values 2021-03-15 20:02:52 -07:00
Gustavo Henrique Nihei
00d9f81919 fs/mmap: Clarify MAP_PRIVATE dependency on CONFIG_FS_RAMMAP 2021-03-15 20:02:52 -07:00
YAMAMOTO Takashi
87d5a39f68 find_blockdriver: Don't ferr() on MTDs
It's the normal path when you open a MTD. ferr() is too strong.
2021-03-14 22:14:56 -07:00
buyuer
3b23f3f0b8 vfs/epoll: Fix one bug of EPOLL_CTL_DEL.
N/A

Signed-off-by: buyuer <dingddding@163.com>
2021-03-13 10:55:41 -08:00
buyuer
c0f9c7b48c vfs: Fix epoll cannot work under 64-bit operating system
by switching to the real file handle

Signed-off-by: buyuer <dingddding@163.com>
2021-03-13 10:55:41 -08:00
YAMAMOTO Takashi
8d33f7adee hostfs: Document the backends and restrictions 2021-03-11 12:17:23 +08:00
Gustavo Henrique Nihei
330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei
47cb41c92f makefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Xiang Xiao
90be95bb89 sched: Remove all group id related stuff
it is wrong to define a new grpid_t, but not reuse pid_t,
because it make getpid(parent) == getppid(child) impossible.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-05 20:35:22 +08:00
ligd
d2488715c0 fs/mount: fix mount cmd break out when meet stat error
Change-Id: I9307fe67837a6519fffa1844fcfd794f735d2fdd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-04 07:11:51 -08:00
ligd
48d49e5a7c mqueue: add poll support
Change-Id: I7e908f6a6c00158c0946587dd79ae3dc5d279d37
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-04 07:11:43 -08:00
Jiuzhu Dong
4d5a964f29 net: unify socket into file descriptor
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
Xiang Xiao
8d0fd4038b Remove the empty xxx_initialize functions
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I63cb6b37f78e910663724659e11f53e3335d419f
2021-03-03 08:21:04 +00:00
Xiang Xiao
9473434587 Ensure the kernel component don't call userspace API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Xiang Xiao
2c7faade49 fs/lfs: Remove semret temporary variable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2df74c7d42fac25c4b010e6b10c2af36f555c480
2021-02-26 10:45:00 +00:00
Xiang Xiao
ac528203fe fs/lfs: lfs_file_sync() when littlefs_open
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Change-Id: I8935f7aee414580174141f4b114b5faf03ffafd5
2021-02-26 10:45:00 +00:00
Gustavo Henrique Nihei
76acb32e29 Fix typos reported by codespell 2021-02-25 11:31:49 -08:00
Xiang Xiao
e7c97ce7f0 fs: Merge fs_poll into poll_fdsetup
to avoid the user misuse the wrong funciton

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-23 08:39:48 -03:00
Xiang Xiao
72928cebcf fs/procfs: Avoid the duplicated 0x prefix in pthread cmdline
like this:
... <pthread> 0x0x341de68c
by removing "0x" from format string

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-20 10:11:30 -08:00
Byron Ellacott
9a1b726bae fs: change geometry types from size_t to blkcnt_t and blksize_t
This change reflects that the geometry isn't related to the largest
allocatable unit on the platform.

Calls to read and write block devices are also affected and have
been updated.
2021-02-18 20:38:22 -08:00
YAMAMOTO Takashi
73dde4b63b fs/procfs/fs_procfsmeminfo.c: Allow longer heap names 2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
929e438052 procfs: Use procfs_register_meminfo for "Kmem" 2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
c25f4233aa procfs: Use procfs_register_meminfo for "Umem" 2021-02-12 03:16:03 -08:00
YAMAMOTO Takashi
f305cefe82 procfs: Add procfs_register_meminfo
This allows subsystems to register their mallinfo-like functions
to be shown in /proc/meminfo.
2021-02-12 03:16:03 -08:00
Xiang Xiao
280fe41306 fs/eventfd: Convert the indent under EVENT_FD_VFS_PATH option to tab
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5648ca278fccb35010d6c354908b9031930bc5fa
2021-02-05 12:17:47 -03:00
Alin Jerpelea
f9fb182809 Author: Gregory Nutt: update licenses to Apache
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-05 12:15:56 -03:00
Alin Jerpelea
a544c3f499 fs: nxffs: nxstyle error fix
Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-05 12:15:56 -03:00
Jiuzhu Dong
13100cf248 fs/readdir: Must reserve a byte for the NUL terminator
Change-Id: I1df0c278d289b90cc54512c0ee256a95549785ca
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-01-26 18:22:35 -08:00
Juha Niskanen
a5ff391bb3 fs/driver: change unlink to nx_unlink to avoid setting errno
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-01-22 17:10:13 +01:00