add SYNC in function disk_ioctl

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2322 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
sc943313837@gmail.com 2012-10-07 05:13:36 +00:00
parent 4cb779d743
commit c77e211d1d
1 changed files with 4 additions and 0 deletions

View File

@ -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;