diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c index 7c4ecb1baf..a385295ec3 100644 --- a/components/dfs/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/filesystems/elmfat/dfs_elm.c @@ -780,6 +780,10 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff) rt_device_control(device, RT_DEVICE_CTRL_BLK_GETGEOME, &geometry); *(DWORD *)buff = geometry.block_size/geometry.bytes_per_sector; + } + else if (ctrl == CTRL_SYNC) + { + rt_device_control(device, RT_DEVICE_CTRL_BLK_SYNC, RT_NULL); } return RES_OK;