diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-05-20 19:03:01 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-05-20 19:03:01 +0000 |
commit | 953334cef0d815362633d35c326a0a62aefb0c39 (patch) | |
tree | e51e568fa4fa3bf8d17c011ff1ce73c14a460238 | |
parent | 5d3cdada58f833d381c353fd996236574833926b (diff) | |
download | nuttx-953334cef0d815362633d35c326a0a62aefb0c39.tar.gz nuttx-953334cef0d815362633d35c326a0a62aefb0c39.tar.bz2 nuttx-953334cef0d815362633d35c326a0a62aefb0c39.zip |
Added fsync()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@241 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/include/nuttx/fs.h | 15 | ||||
-rw-r--r-- | nuttx/include/unistd.h | 7 |
2 files changed, 15 insertions, 7 deletions
diff --git a/nuttx/include/nuttx/fs.h b/nuttx/include/nuttx/fs.h index 9c4a538df..043514034 100644 --- a/nuttx/include/nuttx/fs.h +++ b/nuttx/include/nuttx/fs.h @@ -136,16 +136,23 @@ struct mountpt_operations off_t (*seek)(FAR struct file *filp, off_t offset, int whence); int (*ioctl)(FAR struct file *filp, 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 + * file systems. + */ + + int (*sync)(FAR struct file *filp); + /* The two structures need not be common after this point. For the * case of struct mountpt_operations, additional operations are included * that used only for mounting and unmounting the volume. */ - int (*bind)(FAR struct inode *blkdriver, const void *data, void **handle); - int (*unbind)(void *handle); + int (*bind)(FAR struct inode *blkdriver, const void *data, void **handle); + int (*unbind)(void *handle); - /* NOTE: More operations will be needed here to support: disk usage stats, stat(), - * sync(), unlink(), mkdir(), chmod(), rename(), etc. + /* NOTE: More operations will be needed here to support: disk usage stats + * stat(), unlink(), mkdir(), chmod(), rename(), etc. */ }; diff --git a/nuttx/include/unistd.h b/nuttx/include/unistd.h index 164b5368e..16414fc77 100644 --- a/nuttx/include/unistd.h +++ b/nuttx/include/unistd.h @@ -94,7 +94,7 @@ #undef _POSIX_ASYNC_IO #undef _POSIX_PRIO_IO -#define fsync(f) +#define fdatasync(f) fsync(f) /************************************************************ * Global Function Prototypes @@ -118,8 +118,9 @@ EXTERN void usleep(unsigned long usec); /* File descriptor operations */ EXTERN int close(int fd); -EXTERN int dup(int fildes); -EXTERN int dup2(int fildes1, int fildes2); +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 int read(int fd, void *buf, unsigned int nbytes); EXTERN int unlink(const char *path); |