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
pull/3936/head
Christopher Haster 2017-03-21 14:07:23 -05:00
parent 590a40d9bf
commit d1468a68ab
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ int FATFileSystem::format(BlockDevice *bd, int allocation_unit) {
// Logical drive number, Partitioning rule, Allocation unit size (bytes per cluster)
fs.lock();
FRESULT res = f_mkfs(fs._fsid, 0, allocation_unit);
FRESULT res = f_mkfs(fs._fsid, 1, allocation_unit);
fs.unlock();
if (res != FR_OK) {
return fat_error_remap(res);