Changeset 0182e5cc in mainline for uspace/srv/fs/fat/fat_ops.c
- Timestamp:
- 2011-05-24T19:56:11Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1467102
- Parents:
- 88a27f1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r88a27f1 r0182e5cc 310 310 311 311 d = ((fat_dentry_t *)b->data) + (idxp->pdi % DPS(bs)); 312 if (FAT_IS_FAT32(bs)) { 313 nodep->firstc = uint16_t_le2host(d->firstc_lo) | 314 (uint16_t_le2host(d->firstc_hi) << 16); 315 } 316 else 317 nodep->firstc = uint16_t_le2host(d->firstc); 318 312 319 if (d->attr & FAT_ATTR_SUBDIR) { 313 320 /* … … 318 325 nodep->type = FAT_DIRECTORY; 319 326 320 327 /* 321 328 * Unfortunately, the 'size' field of the FAT dentry is not 322 329 * defined for the directory entry type. We must determine the 323 330 * size of the directory by walking the FAT. 324 331 */ 332 /* TODO uint16_t clusters to uint32_t */ 325 333 uint16_t clusters; 326 rc = fat_clusters_get(&clusters, bs, idxp->devmap_handle, 327 uint16_t_le2host(d->firstc)); 334 rc = fat_clusters_get(&clusters, bs, idxp->devmap_handle, nodep->firstc); 328 335 if (rc != EOK) { 329 336 (void) block_put(b); … … 337 344 } 338 345 339 nodep->firstc = uint16_t_le2host(d->firstc);340 346 nodep->lnkcnt = 1; 341 347 nodep->refcnt = 1; … … 1029 1035 return; 1030 1036 } 1037 1031 1038 fs_node_initialize(rfn); 1032 1039 fat_node_t *rootp = (fat_node_t *)malloc(sizeof(fat_node_t));
Note:
See TracChangeset
for help on using the changeset viewer.