add blockdev's flush fops for opening file with O_SYNC (#8232)

This commit is contained in:
xiao-mang 2023-11-10 17:50:20 +08:00 committed by GitHub
parent a0b6e14f01
commit 48f53e9150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -614,6 +614,11 @@ static int rt_mmcsd_fops_poll(struct dfs_file *file, struct rt_pollreq *req)
return mask;
}
static int rt_mmcsd_fops_flush(struct dfs_file *file)
{
return RT_EOK;
}
const static struct dfs_file_ops mmcsd_blk_fops =
{
rt_mmcsd_fops_open,
@ -621,7 +626,7 @@ const static struct dfs_file_ops mmcsd_blk_fops =
rt_mmcsd_fops_ioctl,
rt_mmcsd_fops_read,
rt_mmcsd_fops_write,
RT_NULL,
rt_mmcsd_fops_flush,
generic_dfs_lseek,
RT_NULL,
RT_NULL,