Changeset db4ec8d in mainline
- Timestamp:
- 2010-09-07T19:56:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1882525, 7431b665
- Parents:
- 4637c72
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
r4637c72 rdb4ec8d 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.