Skip to content

Commit e2745b3

Browse files
committed
lib/fatfs: Allow a smaller minimum sector count for fatfs to be created.
1 parent 20236a8 commit e2745b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/fatfs/ff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4073,7 +4073,7 @@ FRESULT f_mkfs (
40734073
n_vol = LD_DWORD(tbl+12); /* Volume size */
40744074
} else {
40754075
/* Create a partition in this function */
4076-
if (disk_ioctl(pdrv, GET_SECTOR_COUNT, &n_vol) != RES_OK || n_vol < 128)
4076+
if (disk_ioctl(pdrv, GET_SECTOR_COUNT, &n_vol) != RES_OK || n_vol < 48) /* dpgeorge: allow smaller minimum volume; 48 was 128 */
40774077
return FR_DISK_ERR;
40784078
b_vol = (sfd) ? 0 : 63; /* Volume start sector */
40794079
n_vol -= b_vol; /* Volume size */

0 commit comments

Comments
 (0)