Changeset 61c0402 in mainline for uspace/srv/fs/fat/fat_fat.c
- Timestamp:
- 2010-01-15T19:36:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 92bee46
- Parents:
- 50f9c3a (diff), 963462af (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
r50f9c3a r61c0402 46 46 #include <align.h> 47 47 #include <assert.h> 48 #include <fibril_sync .h>48 #include <fibril_synch.h> 49 49 #include <mem.h> 50 50 … … 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.