Changeset 93e12f3 in mainline
- Timestamp:
- 2011-08-15T21:47:38Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a9b756e
- Parents:
- bca3eac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_ops.c
rbca3eac r93e12f3 137 137 exfat_directory_open_parent(&di, node->idx->devmap_handle, node->idx->pfc, 138 138 node->idx->parent_fragmented); 139 rc = exfat_directory_seek(&di, node->idx->pdi); 140 if (rc != EOK) { 141 (void) exfat_directory_close(&di); 142 return rc; 143 } 144 139 145 rc = exfat_directory_sync_file(&di, &df, &ds); 140 146 if (rc != EOK) { … … 614 620 exfat_idx_t *idxp; 615 621 exfat_node_t *nodep; 616 int rc; 617 622 exfat_bs_t *bs; 623 int rc; 624 625 bs = block_bb_get(devmap_handle); 618 626 rc = exfat_node_get_new(&nodep); 619 627 if (rc != EOK) … … 625 633 return rc; 626 634 } 627 628 if (flags & L_DIRECTORY)629 nodep->type = EXFAT_DIRECTORY;630 else631 nodep->type = EXFAT_FILE;632 635 633 636 nodep->firstc = 0; … … 640 643 nodep->idx = idxp; 641 644 idxp->nodep = nodep; 642 643 645 fibril_mutex_unlock(&idxp->lock); 646 647 if (flags & L_DIRECTORY) { 648 nodep->type = EXFAT_DIRECTORY; 649 rc = exfat_node_expand(devmap_handle, nodep, 1); 650 if (rc != EOK) { 651 (void) exfat_node_put(FS_NODE(nodep)); 652 return rc; 653 } 654 nodep->size = BPC(bs); 655 } else { 656 nodep->type = EXFAT_FILE; 657 } 658 644 659 *rfn = FS_NODE(nodep); 645 660 return EOK; … … 712 727 if (rc != EOK) 713 728 return rc; 714 715 729 /* 716 730 * At this point we only establish the link between the parent and the … … 735 749 childp->idx->pfc = parentp->firstc; 736 750 childp->idx->parent_fragmented = parentp->fragmented; 737 childp->idx->pdi = di.pos; /* di.pos holds absolute position of SFN entry */751 childp->idx->pdi = di.pos; 738 752 fibril_mutex_unlock(&childp->idx->lock); 739 753 … … 932 946 int i, rc; 933 947 exfat_cluster_t clst; 934 for (i=0; i<= 10; i++) {948 for (i=0; i<=7; i++) { 935 949 rc = exfat_get_cluster(bs, devmap_handle, i, &clst); 936 950 if (rc != EOK) … … 1168 1182 return EOK; 1169 1183 } 1170 1171 /*1172 int bitmap_is_allocated(exfat_bs_t *bs, devmap_handle_t devmap_handle,1173 exfat_cluster_t clst, bool *status)1174 {1175 fs_node_t *fn;1176 exfat_node_t *bitmap;1177 int rc;1178 1179 rc = exfat_bitmap_get(&fn, devmap_handle);1180 if (rc != EOK)1181 return rc;1182 1183 nbitmap = EXFAT_NODE(fn);1184 1185 1186 return EOK;1187 }1188 */1189 1184 1190 1185 static int … … 1364 1359 1365 1360 boundary = ROUND_UP(nodep->size, BPC(bs)); 1366 1367 1361 if (pos >= boundary) { 1368 1362 unsigned nclsts;
Note:
See TracChangeset
for help on using the changeset viewer.