Changeset 1d8cdb1 in mainline for uspace/srv/fs/fat/fat_ops.c
- Timestamp:
- 2008-11-18T20:28:17Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 18c485a
- Parents:
- 26fa0f9f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r26fa0f9f r1d8cdb1 90 90 /* Read the block that contains the dentry of interest. */ 91 91 b = _fat_block_get(bs, node->idx->dev_handle, node->idx->pfc, 92 (node->idx->pdi * sizeof(fat_dentry_t)) / bps );92 (node->idx->pdi * sizeof(fat_dentry_t)) / bps, BLOCK_FLAGS_NONE); 93 93 94 94 d = ((fat_dentry_t *)b->data) + (node->idx->pdi % dps); … … 182 182 /* Read the block that contains the dentry of interest. */ 183 183 b = _fat_block_get(bs, idxp->dev_handle, idxp->pfc, 184 (idxp->pdi * sizeof(fat_dentry_t)) / bps );184 (idxp->pdi * sizeof(fat_dentry_t)) / bps, BLOCK_FLAGS_NONE); 185 185 assert(b); 186 186 … … 283 283 blocks = parentp->size / bps; 284 284 for (i = 0; i < blocks; i++) { 285 b = fat_block_get(bs, parentp, i );285 b = fat_block_get(bs, parentp, i, BLOCK_FLAGS_NONE); 286 286 for (j = 0; j < dps; j++) { 287 287 d = ((fat_dentry_t *)b->data) + j; … … 373 373 fat_dentry_t *d; 374 374 375 b = fat_block_get(bs, nodep, i );375 b = fat_block_get(bs, nodep, i, BLOCK_FLAGS_NONE); 376 376 for (j = 0; j < dps; j++) { 377 377 d = ((fat_dentry_t *)b->data) + j; … … 575 575 bytes = min(len, bps - pos % bps); 576 576 bytes = min(bytes, nodep->size - pos); 577 b = fat_block_get(bs, nodep, pos / bps); 577 b = fat_block_get(bs, nodep, pos / bps, 578 BLOCK_FLAGS_NONE); 578 579 (void) ipc_data_read_finalize(callid, b->data + pos % bps, 579 580 bytes); … … 600 601 off_t o; 601 602 602 b = fat_block_get(bs, nodep, bnum );603 b = fat_block_get(bs, nodep, bnum, BLOCK_FLAGS_NONE); 603 604 for (o = pos % (bps / sizeof(fat_dentry_t)); 604 605 o < bps / sizeof(fat_dentry_t); … … 648 649 unsigned bpc; /* bytes per cluster */ 649 650 off_t boundary; 651 int flags = BLOCK_FLAGS_NONE; 650 652 651 653 if (!nodep) { … … 676 678 */ 677 679 bytes = min(len, bps - pos % bps); 680 if (bytes == bps) 681 flags |= BLOCK_FLAGS_NOREAD; 678 682 679 683 boundary = ROUND_UP(nodep->size, bpc); … … 686 690 */ 687 691 fat_fill_gap(bs, nodep, FAT_CLST_RES0, pos); 688 b = fat_block_get(bs, nodep, pos / bps );692 b = fat_block_get(bs, nodep, pos / bps, flags); 689 693 (void) ipc_data_write_finalize(callid, b->data + pos % bps, 690 694 bytes); … … 719 723 /* zero fill any gaps */ 720 724 fat_fill_gap(bs, nodep, mcl, pos); 721 b = _fat_block_get(bs, dev_handle, lcl, (pos / bps) % spc); 725 b = _fat_block_get(bs, dev_handle, lcl, (pos / bps) % spc, 726 flags); 722 727 (void) ipc_data_write_finalize(callid, b->data + pos % bps, 723 728 bytes);
Note:
See TracChangeset
for help on using the changeset viewer.