Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7f381e5 in mainline


Ignore:
Timestamp:
2012-02-24T09:28:47Z (8 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
master
Children:
78de7be2
Parents:
a69e396
Message:

mkexfat: rename fat_write to fat_initialize.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkexfat/mkexfat.c

    ra69e396 r7f381e5  
    178178        printf(NAME ": Data start sector:     %lu\n", cfg->data_start_sector);
    179179        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));
    180184}
    181185
     
    320324}
    321325
    322 /** Writes the FAT on disk.
     326/** Initialize the FAT table.
    323327 *
    324328 * @param service_id  The service id.
     
    327331 */
    328332static int
    329 fat_write(service_id_t service_id, exfat_cfg_t *cfg)
     333fat_initialize(service_id_t service_id, exfat_cfg_t *cfg)
    330334{
    331335        unsigned long i;
     
    340344        pfat[1] = host2uint32_t_le(0xFFFFFFFF);
    341345
    342         /* Allocate clusters for the bitmap, upcase table
    343          * 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 
    349346        rc = block_write_direct(service_id, FAT_SECTOR_START, 1, pfat);
    350347        if (rc != EOK)
    351348                goto error;
    352349
    353         memset(pfat, 0, 5 * sizeof(uint32_t));
     350        memset(pfat, 0, 2 * sizeof(uint32_t));
    354351
    355352        for (i = 1; i < cfg->fat_sector_count; ++i) {
     
    522519        }
    523520
    524         rc = fat_write(service_id, &cfg);
     521        rc = fat_initialize(service_id, &cfg);
    525522        if (rc != EOK) {
    526523                printf(NAME ": Error, failed to write the FAT to disk\n");
Note: See TracChangeset for help on using the changeset viewer.