summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-10-07 05:13:36 +0000
committer[email protected] <[email protected]>2012-10-07 05:13:36 +0000
commitc77e211d1d8458066604ca3920567b37a0a84fe2 (patch)
tree29fb702571497fa752d9e43f989e90be47f90a82
parent4cb779d743d484c0ffc4c53a4421969984e02dd7 (diff)
add SYNC in function disk_ioctl
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2322 bbd45198-f89e-11dd-88c7-29a3b14d5316
-rw-r--r--components/dfs/filesystems/elmfat/dfs_elm.c4
1 files changed, 4 insertions, 0 deletions
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;