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:
parent
f9de27c80b
commit
c567505d21
@ -136,16 +136,23 @@ struct mountpt_operations
|
|||||||
off_t (*seek)(FAR struct file *filp, off_t offset, int whence);
|
off_t (*seek)(FAR struct file *filp, off_t offset, int whence);
|
||||||
int (*ioctl)(FAR struct file *filp, int cmd, unsigned long arg);
|
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
|
/* The two structures need not be common after this point. For the
|
||||||
* case of struct mountpt_operations, additional operations are included
|
* case of struct mountpt_operations, additional operations are included
|
||||||
* that used only for mounting and unmounting the volume.
|
* that used only for mounting and unmounting the volume.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int (*bind)(FAR struct inode *blkdriver, const void *data, void **handle);
|
int (*bind)(FAR struct inode *blkdriver, const void *data, void **handle);
|
||||||
int (*unbind)(void *handle);
|
int (*unbind)(void *handle);
|
||||||
|
|
||||||
/* NOTE: More operations will be needed here to support: disk usage stats, stat(),
|
/* NOTE: More operations will be needed here to support: disk usage stats
|
||||||
* sync(), unlink(), mkdir(), chmod(), rename(), etc.
|
* stat(), unlink(), mkdir(), chmod(), rename(), etc.
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
#undef _POSIX_ASYNC_IO
|
#undef _POSIX_ASYNC_IO
|
||||||
#undef _POSIX_PRIO_IO
|
#undef _POSIX_PRIO_IO
|
||||||
|
|
||||||
#define fsync(f)
|
#define fdatasync(f) fsync(f)
|
||||||
|
|
||||||
/************************************************************
|
/************************************************************
|
||||||
* Global Function Prototypes
|
* Global Function Prototypes
|
||||||
@ -118,8 +118,9 @@ EXTERN void usleep(unsigned long usec);
|
|||||||
/* File descriptor operations */
|
/* File descriptor operations */
|
||||||
|
|
||||||
EXTERN int close(int fd);
|
EXTERN int close(int fd);
|
||||||
EXTERN int dup(int fildes);
|
EXTERN int dup(int fd);
|
||||||
EXTERN int dup2(int fildes1, int fildes2);
|
EXTERN int dup2(int fd1, int fd2);
|
||||||
|
EXTERN int fsync(int fd);
|
||||||
EXTERN off_t lseek(int fd, off_t offset, int whence);
|
EXTERN off_t lseek(int fd, off_t offset, int whence);
|
||||||
EXTERN int read(int fd, void *buf, unsigned int nbytes);
|
EXTERN int read(int fd, void *buf, unsigned int nbytes);
|
||||||
EXTERN int unlink(const char *path);
|
EXTERN int unlink(const char *path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user