tmpfs: support fsync always successful
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
e2c9f612c9
commit
f04ca25f9d
@ -124,6 +124,7 @@ static ssize_t tmpfs_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
size_t buflen);
|
size_t buflen);
|
||||||
static off_t tmpfs_seek(FAR struct file *filep, off_t offset, int whence);
|
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_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_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_fstat(FAR const struct file *filep, FAR struct stat *buf);
|
||||||
static int tmpfs_truncate(FAR struct file *filep, off_t length);
|
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_seek, /* seek */
|
||||||
tmpfs_ioctl, /* ioctl */
|
tmpfs_ioctl, /* ioctl */
|
||||||
|
|
||||||
NULL, /* sync */
|
tmpfs_sync, /* sync */
|
||||||
tmpfs_dup, /* dup */
|
tmpfs_dup, /* dup */
|
||||||
tmpfs_fstat, /* fstat */
|
tmpfs_fstat, /* fstat */
|
||||||
NULL, /* fchstat */
|
NULL, /* fchstat */
|
||||||
@ -1750,6 +1751,15 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: tmpfs_sync
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
static int tmpfs_sync(FAR struct file *filep)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: tmpfs_dup
|
* Name: tmpfs_dup
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user