Changeset df1b4a8 in mainline
- Timestamp:
- 2024-06-18T21:28:27Z (3 months ago)
- Branches:
- master
- Children:
- 7cec216
- Parents:
- c15296b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkfat/mkfat.c
rc15296b rdf1b4a8 66 66 default_fat_count = 2, 67 67 default_reserved_clusters = 2, 68 default_media_descriptor = 0xF8 /**< fixed disk */ 68 default_media_descriptor = 0xF8 /**< fixed disk */, 69 fat32_root_cluster = 2 69 70 }; 70 71 … … 313 314 cfg->reserved_sectors = 1 + cfg->addt_res_sectors; 314 315 315 /* Only correct for FAT12/16 (FAT32 has root dir stored in clusters */316 /* Only correct for FAT12/16 (FAT32 has root dir stored in clusters) */ 316 317 rd_sectors = div_round_up(cfg->root_ent_max * DIRENT_SIZE, 317 318 cfg->sector_size); … … 434 435 } 435 436 437 if (cfg->fat_type == FAT32) { 438 /* Root dir is stored in cluster fat32_root_cluster */ 439 addr += fat32_root_cluster * cfg->sectors_per_cluster; 440 } 441 436 442 /* Root directory */ 437 443 printf("Writing root directory.\n"); … … 529 535 bs->fat32.ebs = 0x29; 530 536 bs->fat32.id = host2uint32_t_be(vsn); 531 bs->fat32.root_cluster = 2;537 bs->fat32.root_cluster = fat32_root_cluster; 532 538 533 539 (void) fat_label_encode(&bs->fat32.label, bs_label);
Note:
See TracChangeset
for help on using the changeset viewer.