Changes in uspace/srv/fs/fat/fat_fat.c [1e4cada:711e1f32] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
r1e4cada r711e1f32 247 247 */ 248 248 int 249 fat_get_cluster(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t clst,250 fat_cluster_t *value)249 fat_get_cluster(fat_bs_t *bs, dev_handle_t dev_handle, unsigned fatno, 250 fat_cluster_t clst, fat_cluster_t *value) 251 251 { 252 252 block_t *b; 253 253 uint16_t bps; 254 254 uint16_t rscnt; 255 uint16_t sf; 255 256 fat_cluster_t *cp; 256 257 int rc; … … 258 259 bps = uint16_t_le2host(bs->bps); 259 260 rscnt = uint16_t_le2host(bs->rscnt); 260 261 rc = block_get(&b, dev_handle, rscnt + 261 sf = uint16_t_le2host(bs->sec_per_fat); 262 263 rc = block_get(&b, dev_handle, rscnt + sf * fatno + 262 264 (clst * sizeof(fat_cluster_t)) / bps, BLOCK_FLAGS_NONE); 263 265 if (rc != EOK) … … 480 482 while (firstc < FAT_CLST_LAST1) { 481 483 assert(firstc >= FAT_CLST_FIRST && firstc < FAT_CLST_BAD); 482 rc = fat_get_cluster(bs, dev_handle, firstc, &nextc);484 rc = fat_get_cluster(bs, dev_handle, FAT1, firstc, &nextc); 483 485 if (rc != EOK) 484 486 return rc; … … 560 562 unsigned fatno; 561 563 562 rc = fat_get_cluster(bs, dev_handle, lastc, &nextc);564 rc = fat_get_cluster(bs, dev_handle, FAT1, lastc, &nextc); 563 565 if (rc != EOK) 564 566 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.