tmpfs: support fsync always successful
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
e2c9f612c9
commit
f04ca25f9d
1 changed files with 11 additions and 1 deletions
|
@ -124,6 +124,7 @@ static ssize_t tmpfs_write(FAR struct file *filep, FAR const char *buffer,
|
|||
size_t buflen);
|
||||
static off_t tmpfs_seek(FAR struct file *filep, off_t offset, int whence);
|
||||
static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
|
||||
static int tmpfs_sync(FAR struct file *filep);
|
||||
static int tmpfs_dup(FAR const struct file *oldp, FAR struct file *newp);
|
||||
static int tmpfs_fstat(FAR const struct file *filep, FAR struct stat *buf);
|
||||
static int tmpfs_truncate(FAR struct file *filep, off_t length);
|
||||
|
@ -165,7 +166,7 @@ const struct mountpt_operations tmpfs_operations =
|
|||
tmpfs_seek, /* seek */
|
||||
tmpfs_ioctl, /* ioctl */
|
||||
|
||||
NULL, /* sync */
|
||||
tmpfs_sync, /* sync */
|
||||
tmpfs_dup, /* dup */
|
||||
tmpfs_fstat, /* fstat */
|
||||
NULL, /* fchstat */
|
||||
|
@ -1750,6 +1751,15 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||
return -ENOTTY;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: tmpfs_sync
|
||||
****************************************************************************/
|
||||
|
||||
static int tmpfs_sync(FAR struct file *filep)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: tmpfs_dup
|
||||
****************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue