Skip to content

Commit d1468a6

Browse files
committed
FAT: Removed implicit MBR from FAT filesystem during format
- Implicit MBR still allowed during mount - maintains storage compatibility - Not needed - MBR utility is not exposed through the FAT filesystem, so the only used partition was always the first. Omitting the MBR is functionally equivalent - Saves a few blocks on storage for MBR + offset for FAT alignment - Duplicated with MBRBlockDevice - The implicit MBR actually prevents nesting a FAT filesystem in the MBRBlockDevice
1 parent 590a40d commit d1468a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/filesystem/fat/FATFileSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ int FATFileSystem::format(BlockDevice *bd, int allocation_unit) {
290290

291291
// Logical drive number, Partitioning rule, Allocation unit size (bytes per cluster)
292292
fs.lock();
293-
FRESULT res = f_mkfs(fs._fsid, 0, allocation_unit);
293+
FRESULT res = f_mkfs(fs._fsid, 1, allocation_unit);
294294
fs.unlock();
295295
if (res != FR_OK) {
296296
return fat_error_remap(res);

0 commit comments

Comments
 (0)