Changeset 89a0a827 in mainline
- Timestamp:
- 2012-02-24T22:21:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 552efe3
- Parents:
- 557e5b13
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkexfat/mkexfat.c
r557e5b13 r89a0a827 163 163 cfg->cluster_size); 164 164 165 /* FIXME: set the real rootdir cluster */165 /* Will be set later */ 166 166 cfg->rootdir_cluster = 0; 167 167 … … 470 470 } 471 471 472 /** Write the upcase table to disk. */ 473 static int 474 upcase_table_write(service_id_t service_id, exfat_cfg_t *cfg) 475 { 476 int rc; 477 aoff64_t start_sec, nsecs, i; 478 uint8_t *table_ptr; 479 480 start_sec = cfg->data_start_sector; 481 start_sec += (cfg->upcase_table_cluster * cfg->cluster_size) / 482 cfg->sector_size; 483 484 nsecs = div_round_up(sizeof(upcase_table), cfg->sector_size); 485 table_ptr = (uint8_t *) upcase_table; 486 487 for (i = 0; i < nsecs; ++i, table_ptr += cfg->sector_size) { 488 rc = block_write_direct(service_id, 489 start_sec + i, 1, table_ptr); 490 if (rc != EOK) 491 return rc; 492 } 493 494 return EOK; 495 } 496 472 497 /** Given a number (n), returns the result of log2(n). 473 498 * … … 617 642 } 618 643 644 rc = upcase_table_write(service_id, &cfg); 645 if (rc != EOK) { 646 printf(NAME ": Error, failed to write the upcase table to disk.\n"); 647 return 2; 648 } 649 619 650 rc = bootsec_write(service_id, &cfg); 620 651 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.