[stage2] Support sector sizes up to 4K in FatFs.
Note: SD cards always have a sector size of 512 bytes.
This commit is contained in:
@@ -116,6 +116,13 @@ DRESULT disk_ioctl (
|
||||
void *buff /* Buffer to send/receive control data */
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
device_partition_t *devpart = g_volume_to_devparts[pdrv];
|
||||
switch (cmd) {
|
||||
case GET_SECTOR_SIZE:
|
||||
*(WORD *)buff = devpart != NULL ? (WORD)devpart->sector_size : 512;
|
||||
return 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user