summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiao-mang <[email protected]>2023-11-10 17:50:20 +0800
committerGitHub <[email protected]>2023-11-10 17:50:20 +0800
commit48f53e9150a96ca27e3b33264c36c4431caf8af9 (patch)
tree2365cfb5925964db05e80b4e91c49e2603912edb
parenta0b6e14f0108df2c3ed611fe9df6ce69a7b5b8e7 (diff)
add blockdev's flush fops for opening file with O_SYNC (#8232)
-rw-r--r--components/drivers/sdio/block_dev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/drivers/sdio/block_dev.c b/components/drivers/sdio/block_dev.c
index 5bbdbb6696..fcef99f170 100644
--- a/components/drivers/sdio/block_dev.c
+++ b/components/drivers/sdio/block_dev.c
@@ -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,