Commit Graph

12 Commits

Author SHA1 Message Date
zhanghongyu b723e90356 fs: move memset to upper lever for statfs
if struct statfs add new members, such as f_fsid, no additional code
changes are required.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-06-16 11:10:25 +08:00
Xiang Xiao 6f6fce95a2 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
chao an e28958fe5c fs/mount: fix compiler warning found out by GCC-12.2
mount/fs_foreachmountpoint.c: In function 'mountpoint_filter':
mount/fs_foreachmountpoint.c:99:38: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
   99 |       sprintf(&dirpath[pathlen], "/%s", node->i_name);
      |                                      ^
In function 'mountpoint_filter',
    inlined from 'mountpoint_filter' at mount/fs_foreachmountpoint.c:64:12:
mount/fs_foreachmountpoint.c:99:7: note: 'sprintf' output between 2 and 257 bytes into a destination of size 256
   99 |       sprintf(&dirpath[pathlen], "/%s", node->i_name);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-21 09:28:57 +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
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
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
Gregory Nutt 1ed816de4b Squashed commit of the following:
fs/mount:  Implements procfs /proc/fs/blocks and /proc/fs/usage files, replacing the NSH df command.
    fs/mount:  Implements procfs /proc/fs/mount file, replacing the NSH mount command when there are not arguments.
    fs/: Move prototype of foreach_mountpoint out of include/nuttx/fs/fs.h to fs/mount/mount.h.  Add framework for the mount procfs (initial commit is just a close of the net/route table procfs.
2017-10-26 13:33:08 -06:00
Gregory Nutt 0fb035f76b Standardize some naming in code section comments 2016-02-21 18:09:04 -06:00
Gregory Nutt 0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt 76906110b0 Correct spelling: MOUNTPOINT not MOUNTPOUNT. Numerous places. Some are problems. From Woohan Lee 2014-12-01 06:41:30 -06:00
Gregory Nutt ae90309b36 Move fs/fs.h to fs/inode/inode.h and some to fs/driver/driver.h 2014-09-29 07:14:38 -06:00
Gregory Nutt 36a88638a4 Move mount-related files from fs/. to fs/mount/. 2014-09-28 11:28:17 -06:00