Added fsync()

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@241 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-05-20 19:03:01 +00:00
parent f9de27c80b
commit c567505d21
2 changed files with 15 additions and 7 deletions

View File

@ -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.
*/
};

View File

@ -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);