Skip to content

Commit 58a74d5

Browse files
committed
Do not format as FAT12/16/32 when exFAT is selected. Just exit for now since it's unsupported.
1 parent 143501d commit 58a74d5

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

source/format.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,14 @@ u32 formatSd(const char *const path, const std::string &label, const ArgFlags fl
204204
// TODO: Label should be upper case and some chars are not allowed. Implement conversion + checks.
205205
// mkfs.fat allows lower case but warns about it.
206206
verbosePuts("Formatting the partition...");
207-
if(makeFsFat(params, dev, label) != 0) return ERR_FORMAT;
208-
// TODO: exFAT.
207+
if(params.fatBits <= 32)
208+
{
209+
if(makeFsFat(params, dev, label) != 0) return ERR_FORMAT;
210+
}
211+
else
212+
{
213+
// TODO: exFAT.
214+
}
209215

210216
// Explicitly close dev to get the result.
211217
if(dev.close() != 0) return ERR_CLOSE_DEV;

0 commit comments

Comments
 (0)