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.
This commit is contained in:
Gregory Nutt
2020-05-22 22:58:52 -06:00
committed by Xiang Xiao
parent adc0c3e459
commit 154a87993f
7 changed files with 98 additions and 137 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
"execv","unistd.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS)","int","FAR const char *","FAR char * const []|FAR char * const *"
"exit","stdlib.h","","void","int"
"fcntl","fcntl.h","","int","int","int","...","int"
"fs_fdopen","nuttx/fs/fs.h","CONFIG_NFILE_STREAMS > 0","FAR struct file_struct *","int","int","FAR struct tcb_s *"
"fs_fdopen","nuttx/fs/fs.h","CONFIG_NFILE_STREAMS > 0","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"
1 _exit unistd.h void int
23 execv unistd.h !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) int FAR const char *
24 exit stdlib.h void int
25 fcntl fcntl.h int int
26 fs_fdopen nuttx/fs/fs.h CONFIG_NFILE_STREAMS > 0 FAR struct file_struct * int int
27 fstat sys/stat.h int int
28 fstatfs sys/statfs.h int int
29 fsync unistd.h !defined(CONFIG_DISABLE_MOUNTPOINT) int int