4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-21 01:07:18 +08:00

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

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;