Changeset 7f381e5 in mainline
- Timestamp:
- 2012-02-24T09:28:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 78de7be2
- Parents:
- a69e396
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkexfat/mkexfat.c
ra69e396 r7f381e5 178 178 printf(NAME ": Data start sector: %lu\n", cfg->data_start_sector); 179 179 printf(NAME ": Total num of clusters: %lu\n", cfg->total_clusters); 180 printf(NAME ": Bitmap size: %lu\n", 181 div_round_up(cfg->bitmap_size, cfg->cluster_size)); 182 printf(NAME ": Upcase table size: %lu\n", 183 div_round_up(sizeof(upcase_table), cfg->cluster_size)); 180 184 } 181 185 … … 320 324 } 321 325 322 /** Writes the FAT on disk.326 /** Initialize the FAT table. 323 327 * 324 328 * @param service_id The service id. … … 327 331 */ 328 332 static int 329 fat_ write(service_id_t service_id, exfat_cfg_t *cfg)333 fat_initialize(service_id_t service_id, exfat_cfg_t *cfg) 330 334 { 331 335 unsigned long i; … … 340 344 pfat[1] = host2uint32_t_le(0xFFFFFFFF); 341 345 342 /* Allocate clusters for the bitmap, upcase table343 * and the root directory.344 */345 pfat[2] = host2uint32_t_le(0xFFFFFFFF);346 pfat[3] = host2uint32_t_le(0xFFFFFFFF);347 pfat[4] = host2uint32_t_le(0xFFFFFFFF);348 349 346 rc = block_write_direct(service_id, FAT_SECTOR_START, 1, pfat); 350 347 if (rc != EOK) 351 348 goto error; 352 349 353 memset(pfat, 0, 5* sizeof(uint32_t));350 memset(pfat, 0, 2 * sizeof(uint32_t)); 354 351 355 352 for (i = 1; i < cfg->fat_sector_count; ++i) { … … 522 519 } 523 520 524 rc = fat_ write(service_id, &cfg);521 rc = fat_initialize(service_id, &cfg); 525 522 if (rc != EOK) { 526 523 printf(NAME ": Error, failed to write the FAT to disk\n");
Note:
See TracChangeset
for help on using the changeset viewer.