Changes in uspace/app/mkfat/mkfat.c [09ab0a9a:df1b4a8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkfat/mkfat.c
r09ab0a9a rdf1b4a8 1 1 /* 2 * Copyright (c) 20 10Jiri Svoboda2 * Copyright (c) 2024 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 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 … … 198 199 } 199 200 200 rc = block_init(service_id , 2048);201 rc = block_init(service_id); 201 202 if (rc != EOK) { 202 203 printf(NAME ": Error initializing libblock.\n"); … … 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.