Changeset 7431b665 in mainline for uspace/srv/fs/fat/fat_fat.c
- Timestamp:
- 2010-09-07T20:00:15Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2fa10f6
- Parents:
- 3249673 (diff), db4ec8d (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
r3249673 r7431b665 545 545 dev_handle_t dev_handle = nodep->idx->dev_handle; 546 546 fat_cluster_t lastc; 547 uint16_t numc;548 547 uint8_t fatno; 549 548 int rc; 550 549 551 if (nodep->lastc_cached_valid) { 552 lastc = nodep->lastc_cached_value; 553 nodep->lastc_cached_valid = false; 550 if (nodep->firstc == FAT_CLST_RES0) { 551 /* No clusters allocated to the node yet. */ 552 nodep->firstc = mcl; 553 nodep->dirty = true; /* need to sync node */ 554 554 } else { 555 rc = fat_cluster_walk(bs, dev_handle, nodep->firstc, &lastc, 556 &numc, (uint16_t) -1); 557 if (rc != EOK) 558 return rc; 559 560 if (numc == 0) { 561 /* No clusters allocated to the node yet. */ 562 nodep->firstc = mcl; 563 nodep->dirty = true; /* need to sync node */ 564 return EOK; 555 if (nodep->lastc_cached_valid) { 556 lastc = nodep->lastc_cached_value; 557 nodep->lastc_cached_valid = false; 558 } else { 559 rc = fat_cluster_walk(bs, dev_handle, nodep->firstc, 560 &lastc, NULL, (uint16_t) -1); 561 if (rc != EOK) 562 return rc; 565 563 } 566 } 567 568 for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {569 rc = fat_set_cluster(bs, nodep->idx->dev_handle, fatno, lastc,570 mcl);571 if (rc != EOK)572 return rc;564 565 for (fatno = FAT1; fatno < bs->fatcnt; fatno++) { 566 rc = fat_set_cluster(bs, nodep->idx->dev_handle, fatno, 567 lastc, mcl); 568 if (rc != EOK) 569 return rc; 570 } 573 571 } 574 572
Note:
See TracChangeset
for help on using the changeset viewer.