File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5704,7 +5704,11 @@ FRESULT f_mkfs (
5704
5704
}
5705
5705
sz_fat = (n + ss - 1 ) / ss ; /* FAT size [sector] */
5706
5706
sz_rsv = 1 ; /* Number of reserved sectors */
5707
- n_rootdir = (sz_vol <= 256 )? 64 : n_rootdir ; /* Shrink root dir for <= 128K device */
5707
+ // CIRCUITPY-CHANGE: For fewer than 256 clusters (128kB filesystem),
5708
+ // shrink the root directory size from 512 entries to 128 entries. Note that
5709
+ // long filenames will use two entries. This change affects only the root directory,
5710
+ // not subdirectories
5711
+ n_rootdir = (sz_vol <= 256 ) ? 128 : n_rootdir ;
5708
5712
sz_dir = (DWORD )n_rootdir * SZDIRE / ss ; /* Rootdir size [sector] */
5709
5713
}
5710
5714
b_fat = b_vol + sz_rsv ; /* FAT base */
You can’t perform that action at this time.
0 commit comments