diff options
author | Damien George <damien.p.george@gmail.com> | 2014-12-27 20:20:08 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-12-27 20:20:08 +0000 |
commit | e2745b307b9fd81d36847d75d40a53e597e5a125 (patch) | |
tree | b58e0253a2cdd8ab6f7ec8563b37beef0f176c23 | |
parent | 20236a8a990cae729bca1f7a4e0d619e92a5e37d (diff) | |
download | micropython-e2745b307b9fd81d36847d75d40a53e597e5a125.tar.gz micropython-e2745b307b9fd81d36847d75d40a53e597e5a125.zip |
lib/fatfs: Allow a smaller minimum sector count for fatfs to be created.
-rw-r--r-- | lib/fatfs/ff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fatfs/ff.c b/lib/fatfs/ff.c index dd32f7b3c0..e13391b6c6 100644 --- a/lib/fatfs/ff.c +++ b/lib/fatfs/ff.c @@ -4073,7 +4073,7 @@ FRESULT f_mkfs ( n_vol = LD_DWORD(tbl+12); /* Volume size */
} else {
/* Create a partition in this function */
- 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 < 48) /* dpgeorge: allow smaller minimum volume; 48 was 128 */
return FR_DISK_ERR;
b_vol = (sfd) ? 0 : 63; /* Volume start sector */
n_vol -= b_vol; /* Volume size */
|