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
This commit is contained in:
Xiang Xiao
2021-07-09 13:43:26 +08:00
committed by Gustavo Henrique Nihei
parent 68a345e248
commit 307cc61893
27 changed files with 907 additions and 118 deletions
+9
View File
@@ -9,6 +9,8 @@
"atexit","stdlib.h","defined(CONFIG_SCHED_ATEXIT)","int","void (*)(void)"
"bind","sys/socket.h","defined(CONFIG_NET)","int","int","FAR const struct sockaddr *","socklen_t"
"boardctl","sys/boardctl.h","defined(CONFIG_LIB_BOARDCTL)","int","unsigned int","uintptr_t"
"chmod","sys/stat.h","","int","FAR const char *","mode_t"
"chown","unistd.h","","int","FAR const char *","uid_t","gid_t"
"clearenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int"
"clock","time.h","","clock_t"
"clock_getres","time.h","","int","clockid_t","FAR struct timespec *"
@@ -24,12 +26,15 @@
"exec","nuttx/binfmt/binfmt.h","!defined(CONFIG_BINFMT_DISABLE) && !defined(CONFIG_BUILD_KERNEL)","int","FAR const char *","FAR char * const *","FAR const struct symtab_s *","int"
"execv","unistd.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS)","int","FAR const char *","FAR char * const []|FAR char * const *"
"exit","stdlib.h","","noreturn","int"
"fchmod","sys/stat.h","","int","int","mode_t"
"fchown","unistd.h","","int","int","uid_t","gid_t"
"fcntl","fcntl.h","","int","int","int","...","int"
"fs_fdopen","nuttx/fs/fs.h","defined(CONFIG_FILE_STREAM)","int","int","int","FAR struct tcb_s *","FAR struct file_struct **"
"fstat","sys/stat.h","","int","int","FAR struct stat *"
"fstatfs","sys/statfs.h","","int","int","FAR struct statfs *"
"fsync","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","int"
"ftruncate","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","int","off_t"
"futimens","sys/stat.h","","int","int","const struct timespec [2]|FAR const struct timespec *"
"getenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char *","FAR const char *"
"getgid","unistd.h","defined(CONFIG_SCHED_USER_IDENTITY)","gid_t"
"gethostname","unistd.h","","int","FAR char *","size_t"
@@ -46,9 +51,12 @@
"insmod","nuttx/module.h","defined(CONFIG_MODULE)","FAR void *","FAR const char *","FAR const char *"
"ioctl","sys/ioctl.h","","int","int","int","...","unsigned long"
"kill","signal.h","","int","pid_t","int"
"lchmod","sys/stat.h","","int","FAR const char *","mode_t"
"lchown","unistd.h","","int","FAR const char *","uid_t","gid_t"
"listen","sys/socket.h","defined(CONFIG_NET)","int","int","int"
"lseek","unistd.h","","off_t","int","off_t","int"
"lstat","sys/stat.h","","int","FAR const char *","FAR struct stat *"
"lutimes","sys/time.h","","int","FAR const char *","const struct timeval [2]|FAR const struct timeval *"
"mkdir","sys/stat.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *","mode_t"
"mmap","sys/mman.h","","FAR void *","FAR void *","size_t","int","int","int","off_t"
"modhandle","nuttx/module.h","defined(CONFIG_MODULE)","FAR void *","FAR const char *"
@@ -181,6 +189,7 @@
"unlink","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *"
"unsetenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
"up_assert","nuttx/arch.h","","void","FAR const char *","int"
"utimes","sys/time.h","","int","FAR const char *","const struct timeval [2]|FAR const struct timeval *"
"vfork","unistd.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK)","pid_t"
"wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","FAR int *"
"waitid","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","int","idtype_t","id_t"," FAR siginfo_t *","int"
1 _exit unistd.h noreturn int
9 atexit stdlib.h defined(CONFIG_SCHED_ATEXIT) int void (*)(void)
10 bind sys/socket.h defined(CONFIG_NET) int int
11 boardctl sys/boardctl.h defined(CONFIG_LIB_BOARDCTL) int unsigned int
12 chmod sys/stat.h int FAR const char *
13 chown unistd.h int FAR const char *
14 clearenv stdlib.h !defined(CONFIG_DISABLE_ENVIRON) int
15 clock time.h clock_t
16 clock_getres time.h int clockid_t
26 exec nuttx/binfmt/binfmt.h !defined(CONFIG_BINFMT_DISABLE) && !defined(CONFIG_BUILD_KERNEL) int FAR const char *
27 execv unistd.h !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) int FAR const char *
28 exit stdlib.h noreturn int
29 fchmod sys/stat.h int int
30 fchown unistd.h int int
31 fcntl fcntl.h int int
32 fs_fdopen nuttx/fs/fs.h defined(CONFIG_FILE_STREAM) int int
33 fstat sys/stat.h int int
34 fstatfs sys/statfs.h int int
35 fsync unistd.h !defined(CONFIG_DISABLE_MOUNTPOINT) int int
36 ftruncate unistd.h !defined(CONFIG_DISABLE_MOUNTPOINT) int int
37 futimens sys/stat.h int int
38 getenv stdlib.h !defined(CONFIG_DISABLE_ENVIRON) FAR char * FAR const char *
39 getgid unistd.h defined(CONFIG_SCHED_USER_IDENTITY) gid_t
40 gethostname unistd.h int FAR char *
51 insmod nuttx/module.h defined(CONFIG_MODULE) FAR void * FAR const char *
52 ioctl sys/ioctl.h int int
53 kill signal.h int pid_t
54 lchmod sys/stat.h int FAR const char *
55 lchown unistd.h int FAR const char *
56 listen sys/socket.h defined(CONFIG_NET) int int
57 lseek unistd.h off_t int
58 lstat sys/stat.h int FAR const char *
59 lutimes sys/time.h int FAR const char *
60 mkdir sys/stat.h !defined(CONFIG_DISABLE_MOUNTPOINT) int FAR const char *
61 mmap sys/mman.h FAR void * FAR void *
62 modhandle nuttx/module.h defined(CONFIG_MODULE) FAR void * FAR const char *
189 unlink unistd.h !defined(CONFIG_DISABLE_MOUNTPOINT) int FAR const char *
190 unsetenv stdlib.h !defined(CONFIG_DISABLE_ENVIRON) int FAR const char *
191 up_assert nuttx/arch.h void FAR const char *
192 utimes sys/time.h int FAR const char *
193 vfork unistd.h defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK) pid_t
194 wait sys/wait.h defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT) pid_t FAR int *
195 waitid sys/wait.h defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT) int idtype_t