summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/include/nuttx/fs.h15
-rw-r--r--nuttx/include/unistd.h7
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);