Changeset 5dbd696 in mainline for uspace/app/mkexfat/mkexfat.c
- Timestamp:
- 2012-02-18T18:32:39Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f8973122
- Parents:
- 6b3cda3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkexfat/mkexfat.c
r6b3cda3 r5dbd696 68 68 size_t sector_size; 69 69 size_t cluster_size; 70 u nsigned longtotal_clusters;70 uint32_t total_clusters; 71 71 } exfat_cfg_t; 72 72 … … 83 83 cfg_params_initialize(exfat_cfg_t *cfg) 84 84 { 85 aoff64_t const volume_bytes = cfg->volume_count * cfg->sector_size; 85 unsigned long fat_bytes; 86 aoff64_t const volume_bytes = (cfg->volume_count - FAT_SECTOR_START) * 87 cfg->sector_size; 86 88 87 89 /** Number of clusters required to index the entire device, it must … … 100 102 n_req_clusters = volume_bytes / cfg->cluster_size; 101 103 } 104 105 cfg->total_clusters = n_req_clusters; 106 107 /* Compute the FAT size in sectors */ 108 fat_bytes = (cfg->total_clusters + 1) * 4; 109 cfg->fat_sector_count = div_round_up(fat_bytes, cfg->sector_size); 102 110 } 103 111 … … 203 211 rc = block_get_nblocks(service_id, &cfg.volume_count); 204 212 if (rc != EOK) { 205 printf(NAME ": Warning, failed to obtain device block size.\n"); 206 /* FIXME: the user should specify the filesystem size */ 213 printf(NAME ": Warning, failed to obtain" \ 214 " device block size.\n"); 215 /* FIXME: the user should be able to specify the filesystem size */ 207 216 return 1; 208 217 } else {
Note:
See TracChangeset
for help on using the changeset viewer.