Commit Graph

1593 Commits

Author SHA1 Message Date
ligd
87c47b8758 procfs: fix ps can't log out Group id
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-11 11:13:12 -03:00
zhuyanlin
e53aeea60e fs:procfs: add tcbinfo procfs interface
Add tcbinfo in procfs system.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-11-10 14:31:10 -03:00
Jiuzhu Dong
e5f8acab97 ftruncate: sanity check for parameter:length
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-11-01 11:08:03 +01:00
Xiang Xiao
5f7cc04627 fs/aio: Fix compile warning
aio/lio_listio.c:227:7: warning: implicit declaration of function ‘ferr’ [-Wimplicit-function-declaration]
  227 |       ferr("ERROR: lib_zalloc failed\n");
      |       ^~~~
aio/lio_listio.c:275:3: warning: implicit declaration of function ‘finfo’ [-Wimplicit-function-declaration]
  275 |   finfo("Registering signal handler\n");

aio/aio_read.c: In function ‘aio_read_worker’:
aio/aio_read.c:90:11: warning: implicit declaration of function ‘file_pread’; did you mean ‘aio_read’? [-Wimplicit-function-declaration]
   90 |   nread = file_pread(aioc->aioc_filep, (FAR void *)aiocbp->aio_buf,
      |           ^~~~~~~~~~
      |           aio_read

aio/aio_write.c: In function ‘aio_write_worker’:
aio/aio_write.c:85:12: warning: implicit declaration of function ‘file_fcntl’ [-Wimplicit-function-declaration]
   85 |   oflags = file_fcntl(aioc->aioc_filep, F_GETFL);
      |            ^~~~~~~~~~
CC:  mmap/fs_mmap.c
CC:  pthread/pthread_condclockwait.c
aio/aio_write.c:107:18: warning: implicit declaration of function ‘file_write’; did you mean ‘aio_write’? [-Wimplicit-function-declaration]
  107 |       nwritten = file_write(aioc->aioc_filep,
      |                  ^~~~~~~~~~
      |                  aio_write
aio/aio_write.c:113:18: warning: implicit declaration of function ‘file_pwrite’; did you mean ‘aio_write’? [-Wimplicit-function-declaration]
  113 |       nwritten = file_pwrite(aioc->aioc_filep,
      |                  ^~~~~~~~~~~
      |                  aio_write
In file included from aio/aio_write.c:34:
aio/aio_write.c:121:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
  121 |       ferr("ERROR: write/pwrite/send failed: %d\n", nwritten);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~
      |                                                     |
      |                                                     ssize_t {aka long int}
aio/aio_write.c:121:47: note: format string is defined here
  121 |       ferr("ERROR: write/pwrite/send failed: %d\n", nwritten);
      |                                              ~^
      |                                               |
      |                                               int
      |                                              %ld

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-31 06:30:57 -03:00
Jiuzhu Dong
b5b00c6ba3 fs/partition: support parse gpt partition
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-30 01:24:09 -05:00
Jiuzhu Dong
aaf1a5e113 fs/partition: support parse mbr partition
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-30 01:24:09 -05:00
ligd
e3d20d2c54 mqueue: fix memory leak cause by lost inode_release
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-10-25 18:57:43 +09:00
Masayuki Ishikawa
585b1fc113 fs: mqueue: Change MAX_MQUEUE_PATH to 64
Summary:
- This commit changes MAX_MQUEUE_PATH to 64 to reduce stack
  memory if the NAME_MAX is large

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-10-25 03:57:09 -05:00
Gustavo Henrique Nihei
3819d93b4e fs/mount: Properly handle missing FS on the supported list
Instead of reporting the failure to find a given FS, nx_mount was
reporting a failure to find the block driver, even when the actual block
driver exists.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-10-23 04:02:22 -05:00
Gustavo Henrique Nihei
c019533d7a fs/driver: Fix missing declaration of find_mtddriver when CONFIG_MTD=n
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-10-23 04:02:22 -05:00
anjiahao
0aa14f832d mq_open: add long file name check and parameter check
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-21 11:01:45 -03:00
Xiang Xiao
970cbff638 fs/partition: Make parse_ptable_partition to partition.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-19 08:03:12 -03:00
Xiang Xiao
eb720388ca fs/partition: Make read_partition_block callable outside ptable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-19 08:03:12 -03:00
anjiahao
9b52e4e311 littlefs:fix rmdir can remove a file
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-19 00:12:45 -05:00
zhuyanlin
3e92a4e5fb fs:procfs: add waiting_paging_fill state names
Follow task_state in tcb_s.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-18 10:08:00 -03:00
chao.an
6dde42d79b vfs/poll: correct the return event if inode has closed
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-15 12:02:53 +08:00
Jiuzhu Dong
6df9d1907c fs/ioctl: using FIOC_FILEPATH instead of FIOC_FILENAME.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:56:10 +08:00
Jiuzhu Dong
37fc5036bc inode_getpath: correct get path whether path buffer is clean or not.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:30:22 +08:00
Alin Jerpelea
151f6eab3c author: Anton D. Kachalov: update licenses to Apache
Anton D. Kachalov has submitted the ICLA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-01 21:02:34 +08:00
Alin Jerpelea
f48e561abb LICENSE: add fs/spiffs license
Add add fs/spiffs license to the LICENSE file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-30 22:39:04 +08:00
Alin Jerpelea
bca973ac51 License: BSD: NFS client file system
the NFS client file system uses the BSD license and should
be excluded by default

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-30 22:39:04 +08:00
Xiang Xiao
af72376773 fs: Remove magic field from partition_info_s
since it is wrong and impossible to return file
system magic number from the block or mtd layer.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-20 09:19:52 -03:00
Jiuzhu Dong
dc97ee9b36 fs/mount: fix crash becauseof bad release order
N/A

Change-Id: I850f0706f4554d140a86f935b8dce07d23beedaf
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-19 20:44:18 -07:00
chao.an
9701a678bd net/tcp: add nonblock connect(2) support
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 19:19:05 -07:00
Xiang Xiao
4f8c3ab901 fs: Support 64bit in register_[block|mtd]partition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-16 10:16:09 -03:00
mi
21316466d2 fs/littlefs: improve littlefs flash block erase balance performance 2021-08-14 11:21:44 -07:00
Xiang Xiao
162893cc3b fs/partition: Support BIOC_PARTINFO
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-13 08:45:18 -03:00
Xiang Xiao
6b6c11f0ad mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
177e1ced3f Revert "mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE"
to simplify flt and partion layer implementation

This reverts commit 2e49e1bc5c.
2021-08-12 08:01:29 -03:00
Xiang Xiao
a09f262f1e fs/userfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:57:48 -03:00
Xiang Xiao
9d96c54b1b fs/unionfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:57:34 -03:00
Alan C. Assis
9d79f82e24 mmap: Fix note: initialize the variable 'ret' 2021-08-10 09:08:25 -07:00
Xiang Xiao
d7cb4567e6 fs/nfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 21:28:52 +09:00
Xiang Xiao
580de38832 fs/nfs: Return nanosecond from nfs_fstat and nfs_stat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 21:28:52 +09:00
Xiang Xiao
7a60efab35 fs/nfs: Support 64bit file length
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 21:28:52 +09:00
Xiang Xiao
776458143c fs/hostfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 17:55:44 -03:00
Xiang Xiao
6c61d032db fs: Add utimens and lutimens
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 17:55:44 -03:00
Xiang Xiao
7f60376d3a fs/hostfs: Change all priv_ to priv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 13:20:19 +02:00
Jiuzhu Dong
5c5e75ac6f cmd/df: Fix the abnormal output after off_t change
Change-Id: Ieaf063cb636a77eea971cb19e6eaeea6421bff4b
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-06 08:08:36 -07:00
Xiang Xiao
5025fbef8d Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 19:45:24 +02:00
Xiang Xiao
6a396eb224 Fix the printf warning after off_t change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id46daa2ee690a73d3187b479f0e7ab0e2e361764
2021-08-04 06:48:30 -07:00
Xiang Xiao
319474b1b1 fs: Change off_t and related types to int64_t if long long is supported
since it is very popular that the storage capcacity is large than 4GB
even in the embedded system:
https://www.opengroup.org/platform/lfs.html
https://en.wikipedia.org/wiki/Large-file_support

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I019dc08aff02f9ea01eb6d750033bbc358994da5
2021-08-04 06:48:30 -07:00
Xiang Xiao
a262eebe34 libc: Rename match to fnmatch
specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/fnmatch.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 08:23:35 -03:00
Xiang Xiao
307cc61893 fs: Add fchstat and chstat callback into mountpt_operations
and implement all status related change function. the individual
file system change will provide in other upcoming patchset.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8fde9db8eba9586e9c8da078b67e020c26623cf4
2021-07-29 06:33:49 -03:00
Jiuzhu Dong
11faf0cb20 fs/inode: add sanity check for inode to avoid nullpointer
Change-Id: Ib2c74ba308b8f15756fac4e69632c296243eb4ab
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-25 23:01:37 -07:00
jordi
f3af6edf93 Kconfig: add quotes in source to clean warnings from setconfig
To avoid the setconfig warning "style: quotes recommended around xxx in
source xxx"
2021-07-23 02:32:19 -07:00
Masayuki Ishikawa
e5dafc825d fs: mount: Change the format for df
Summary:
- This commit changes the format for df to support big
  storage up to 2TB.

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-19 04:26:44 -07:00
Masayuki Ishikawa
cfd1c28606 fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t
Summary:
- On Linux, fsblkcnt_t and fsfilcnt_t are used in struct statfs
- This commit applies the same logic

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-19 04:26:44 -07:00
Masayuki Ishikawa
a3f1abfb45 fs: nfs: Fix statfs for NFS
Summary:
- I noticed that the results of the df command are incorrect for NFS.
- Finally, I found that obj_attributes is not needed to
  communicate with the NFS server on Linux
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-19 04:26:44 -07:00
Xiang Xiao
02a6966ad5 fs: mkdir return EEXIST if the path already exist
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie1808697b860974367c17e0ba614ca5cae79f324
2021-07-18 10:25:54 -03:00