We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f92a15 commit 3ee77e3Copy full SHA for 3ee77e3
features/filesystem/fat/ChaN/ff.cpp
@@ -4123,7 +4123,7 @@ FRESULT f_mkfs (
4123
n_vol = LD_DWORD(tbl + 12); /* Volume size */
4124
} else {
4125
/* Create a partition in this function */
4126
- if (disk_ioctl(pdrv, GET_SECTOR_COUNT, &n_vol) != RES_OK || n_vol < 128)
+ if (disk_ioctl(pdrv, GET_SECTOR_COUNT, &n_vol) != RES_OK || n_vol < ((sfd) ? 64 : 128))
4127
return FR_DISK_ERR;
4128
b_vol = (sfd) ? 0 : 63; /* Volume start sector */
4129
n_vol -= b_vol; /* Volume size */
0 commit comments