mkfat: only use 8k sectors over 16 MB, not 16 kB
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
f68f8215b7
commit
66136b70b8
@ -13,7 +13,7 @@ int fat12_mkfs(int fd, uint32_t bytes) {
|
||||
uint8_t mbr[512];
|
||||
const uint32_t sector_size = 512;
|
||||
uint32_t cluster_size = 4096 / sector_size; // 4 kiB cluster sizes match flash erase block size
|
||||
if (bytes > 16000) {
|
||||
if (bytes > 16000000) {
|
||||
// We run out of clusters just below 16 megabytes. Use bigger cluseters.
|
||||
cluster_size = 8192 / sector_size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user