diff options
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/fs/fs.h | 34 | ||||
-rw-r--r-- | nuttx/include/unistd.h | 52 |
2 files changed, 43 insertions, 43 deletions
diff --git a/nuttx/include/nuttx/fs/fs.h b/nuttx/include/nuttx/fs/fs.h index 4a883792a..f73b0b0cf 100644 --- a/nuttx/include/nuttx/fs/fs.h +++ b/nuttx/include/nuttx/fs/fs.h @@ -71,20 +71,20 @@ struct file_operations { /* The device driver open method differs from the mountpoint open method */ - int (*open)(FAR struct file *filp); + int (*open)(FAR struct file *filep); /* The following methods must be identical in signature and position because * the struct file_operations and struct mountp_operations are treated like * unions. */ - int (*close)(FAR struct file *filp); - ssize_t (*read)(FAR struct file *filp, FAR char *buffer, size_t buflen); - ssize_t (*write)(FAR struct file *filp, FAR const char *buffer, size_t buflen); - off_t (*seek)(FAR struct file *filp, off_t offset, int whence); - int (*ioctl)(FAR struct file *filp, int cmd, unsigned long arg); + int (*close)(FAR struct file *filep); + ssize_t (*read)(FAR struct file *filep, FAR char *buffer, size_t buflen); + ssize_t (*write)(FAR struct file *filep, FAR const char *buffer, size_t buflen); + off_t (*seek)(FAR struct file *filep, off_t offset, int whence); + int (*ioctl)(FAR struct file *filep, int cmd, unsigned long arg); #ifndef CONFIG_DISABLE_POLL - int (*poll)(FAR struct file *filp, struct pollfd *fds, bool setup); + int (*poll)(FAR struct file *filep, struct pollfd *fds, bool setup); #endif /* The two structures need not be common after this point */ @@ -139,7 +139,7 @@ struct mountpt_operations * information to manage privileges. */ - int (*open)(FAR struct file *filp, FAR const char *relpath, + int (*open)(FAR struct file *filep, FAR const char *relpath, int oflags, mode_t mode); /* The following methods must be identical in signature and position because @@ -147,11 +147,11 @@ struct mountpt_operations * unions. */ - int (*close)(FAR struct file *filp); - ssize_t (*read)(FAR struct file *filp, FAR char *buffer, size_t buflen); - ssize_t (*write)(FAR struct file *filp, FAR const char *buffer, size_t buflen); - off_t (*seek)(FAR struct file *filp, off_t offset, int whence); - int (*ioctl)(FAR struct file *filp, int cmd, unsigned long arg); + int (*close)(FAR struct file *filep); + ssize_t (*read)(FAR struct file *filep, FAR char *buffer, size_t buflen); + ssize_t (*write)(FAR struct file *filep, FAR const char *buffer, size_t buflen); + off_t (*seek)(FAR struct file *filep, off_t offset, int whence); + int (*ioctl)(FAR struct file *filep, int cmd, unsigned long arg); /* The two structures need not be common after this point. The following * are extended methods needed to deal with the unique needs of mounted @@ -160,7 +160,7 @@ struct mountpt_operations * Additional open-file-specific mountpoint operations: */ - int (*sync)(FAR struct file *filp); + int (*sync)(FAR struct file *filep); int (*dup)(FAR const struct file *oldp, FAR struct file *newp); /* Directory operations */ @@ -273,7 +273,7 @@ struct filelist #if CONFIG_NFILE_STREAMS > 0 struct file_struct { - int fs_filedes; /* File descriptor associated with stream */ + int fs_fd; /* File descriptor associated with stream */ #if CONFIG_STDIO_BUFFER_SIZE > 0 sem_t fs_sem; /* For thread safety */ pid_t fs_holder; /* Holder of sem */ @@ -621,7 +621,7 @@ int lib_flushall(FAR struct streamlist *list); ssize_t lib_sendfile(int outfd, int infd, off_t *offset, size_t count); #endif -/* fs/fs_read.c *************************************************************/ +/* fs/fs_fileread.c *********************************************************/ /**************************************************************************** * Name: file_read * @@ -636,7 +636,7 @@ ssize_t lib_sendfile(int outfd, int infd, off_t *offset, size_t count); ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes); #endif -/* fs/fs_lseek.c ************************************************************/ +/* fs/fs_fileread.c *********************************************************/ /**************************************************************************** * Name: file_seek * diff --git a/nuttx/include/unistd.h b/nuttx/include/unistd.h index 46eb14cdd..dd1ef3f5a 100644 --- a/nuttx/include/unistd.h +++ b/nuttx/include/unistd.h @@ -129,62 +129,62 @@ EXTERN int optopt; /* unrecognized option character */ /* Task Control Interfaces */ -EXTERN pid_t vfork(void); -EXTERN pid_t getpid(void); -EXTERN void _exit(int status) noreturn_function; -EXTERN unsigned int sleep(unsigned int seconds); -EXTERN int usleep(useconds_t usec); -EXTERN int pause(void); +pid_t vfork(void); +pid_t getpid(void); +void _exit(int status) noreturn_function; +unsigned int sleep(unsigned int seconds); +int usleep(useconds_t usec); +int pause(void); /* File descriptor operations */ -EXTERN int close(int fd); -EXTERN int dup(int fd); -EXTERN int dup2(int fd1, int fd2); -EXTERN int fsync(int fd); -EXTERN off_t lseek(int fd, off_t offset, int whence); -EXTERN ssize_t read(int fd, FAR void *buf, size_t nbytes); -EXTERN ssize_t write(int fd, FAR const void *buf, size_t nbytes); +int close(int fd); +int dup(int fd); +int dup2(int fd1, int fd2); +int fsync(int fd); +off_t lseek(int fd, off_t offset, int whence); +ssize_t read(int fd, FAR void *buf, size_t nbytes); +ssize_t write(int fd, FAR const void *buf, size_t nbytes); /* Special devices */ -EXTERN int pipe(int filedes[2]); +int pipe(int fd[2]); /* Working directory operations */ -EXTERN int chdir(FAR const char *path); -EXTERN FAR char *getcwd(FAR char *buf, size_t size); +int chdir(FAR const char *path); +FAR char *getcwd(FAR char *buf, size_t size); /* File path operations */ -EXTERN int unlink(FAR const char *pathname); -EXTERN int rmdir(FAR const char *pathname); +int unlink(FAR const char *pathname); +int rmdir(FAR const char *pathname); /* Execution of programs from files */ #ifdef CONFIG_LIBC_EXECFUNCS -EXTERN int execl(FAR const char *path, ...); -EXTERN int execv(FAR const char *path, FAR char *const argv[]); +int execl(FAR const char *path, ...); +int execv(FAR const char *path, FAR char *const argv[]); /* Non-standard functions to manage symbol tables */ struct symtab_s; /* See include/nuttx/binfmt/symtab.h */ -EXTERN void exec_getsymtab(FAR const struct symtab_s **symtab, FAR int *nsymbols); -EXTERN void exec_setsymtab(FAR const struct symtab_s *symtab, int nsymbols); +void exec_getsymtab(FAR const struct symtab_s **symtab, FAR int *nsymbols); +void exec_setsymtab(FAR const struct symtab_s *symtab, int nsymbols); #endif /* Other */ -EXTERN int getopt(int argc, FAR char *const argv[], FAR const char *optstring); +int getopt(int argc, FAR char *const argv[], FAR const char *optstring); /* Accessor functions intended for use only by external NXFLAT * modules. The global variables optarg, optind, and optopt cannot * be referenced directly from external modules. */ -EXTERN FAR char **getoptargp(void); /* Optional argument following option */ -EXTERN int *getopindgp(void); /* Index into argv */ -EXTERN int *getoptoptp(void); /* unrecognized option character */ +FAR char **getoptargp(void); /* Optional argument following option */ +int *getopindgp(void); /* Index into argv */ +int *getoptoptp(void); /* unrecognized option character */ #undef EXTERN #if defined(__cplusplus) |