Changes in uspace/srv/fs/fat/fat_fat.c [ed903174:7efc517] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
red903174 r7efc517 93 93 94 94 while (clst < FAT_CLST_LAST1 && clusters < max_clusters) { 95 aoff64_t fsec; /* sector offset relative to FAT1 */95 bn_t fsec; /* sector offset relative to FAT1 */ 96 96 unsigned fidx; /* FAT1 entry index */ 97 97 … … 135 135 int 136 136 _fat_block_get(block_t **block, fat_bs_t *bs, dev_handle_t dev_handle, 137 fat_cluster_t firstc, aoff64_t bn, int flags)137 fat_cluster_t firstc, bn_t bn, int flags) 138 138 { 139 139 unsigned bps; … … 148 148 int rc; 149 149 150 /*151 * This function can only operate on non-zero length files.152 */153 if (firstc == FAT_CLST_RES0)154 return ELIMIT;155 156 150 bps = uint16_t_le2host(bs->bps); 157 151 rscnt = uint16_t_le2host(bs->rscnt); … … 196 190 * @return EOK on success or a negative error code. 197 191 */ 198 int fat_fill_gap(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl, aoff64_t pos)192 int fat_fill_gap(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl, off_t pos) 199 193 { 200 194 uint16_t bps; 201 195 unsigned spc; 202 196 block_t *b; 203 aoff64_t o, boundary;197 off_t o, boundary; 204 198 int rc; 205 199 … … 367 361 uint16_t rscnt; 368 362 uint16_t sf; 369 uint 32_t ts;363 uint16_t ts; 370 364 unsigned rde; 371 365 unsigned rds; … … 385 379 sf = uint16_t_le2host(bs->sec_per_fat); 386 380 rde = uint16_t_le2host(bs->root_ent_max); 387 ts = (uint32_t) uint16_t_le2host(bs->totsec16); 388 if (ts == 0) 389 ts = uint32_t_le2host(bs->totsec32); 381 ts = uint16_t_le2host(bs->totsec16); 390 382 391 383 rds = (sizeof(fat_dentry_t) * rde) / bps;
Note:
See TracChangeset
for help on using the changeset viewer.