Changeset c56c4576 in mainline for uspace/srv/fs/exfat/exfat_ops.c
- Timestamp:
- 2011-08-18T18:09:11Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7234617
- Parents:
- 602c3d8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_ops.c
r602c3d8c rc56c4576 125 125 df.attr = 0; 126 126 127 ds.firstc = host2uint32_t_le(node->firstc);127 ds.firstc = node->firstc; 128 128 if (node->size == 0 && node->firstc == 0) { 129 129 ds.flags = 0; … … 132 132 ds.flags |= (!node->fragmented << 1); 133 133 } 134 ds.valid_data_size = host2uint64_t_le(node->size);135 ds.data_size = host2uint64_t_le(node->size);134 ds.valid_data_size = node->size; 135 ds.data_size = node->size; 136 136 137 137 exfat_directory_open_parent(&di, node->idx->devmap_handle, node->idx->pfc, … … 335 335 switch (exfat_classify_dentry(d)) { 336 336 case EXFAT_DENTRY_FILE: 337 nodep->type = ( d->file.attr& EXFAT_ATTR_SUBDIR)?337 nodep->type = (uint16_t_le2host(d->file.attr) & EXFAT_ATTR_SUBDIR)? 338 338 EXFAT_DIRECTORY : EXFAT_FILE; 339 339 rc = exfat_directory_next(&di); … … 349 349 return rc; 350 350 } 351 nodep->firstc = d->stream.firstc;352 nodep->size = d->stream.data_size;351 nodep->firstc = uint32_t_le2host(d->stream.firstc); 352 nodep->size = uint64_t_le2host(d->stream.data_size); 353 353 nodep->fragmented = (d->stream.flags & 0x02) == 0; 354 354 break; 355 355 case EXFAT_DENTRY_BITMAP: 356 356 nodep->type = EXFAT_BITMAP; 357 nodep->firstc = d->bitmap.firstc;358 nodep->size = d->bitmap.size;357 nodep->firstc = uint32_t_le2host(d->bitmap.firstc); 358 nodep->size = uint64_t_le2host(d->bitmap.size); 359 359 nodep->fragmented = true; 360 360 break; 361 361 case EXFAT_DENTRY_UCTABLE: 362 362 nodep->type = EXFAT_UCTABLE; 363 nodep->firstc = d->uctable.firstc;364 nodep->size = d->uctable.size;363 nodep->firstc = uint32_t_le2host(d->uctable.firstc); 364 nodep->size = uint64_t_le2host(d->uctable.size); 365 365 nodep->fragmented = true; 366 366 break; … … 1074 1074 1075 1075 bitmapp->type = EXFAT_BITMAP; 1076 bitmapp->firstc = de->bitmap.firstc;1076 bitmapp->firstc = uint32_t_le2host(de->bitmap.firstc); 1077 1077 bitmapp->fragmented = true; 1078 1078 bitmapp->idx->parent_fragmented = true; 1079 1079 bitmapp->refcnt = 1; 1080 1080 bitmapp->lnkcnt = 0; 1081 bitmapp->size = de->bitmap.size;1081 bitmapp->size = uint64_t_le2host(de->bitmap.size); 1082 1082 1083 1083 /* Initialize the uctable node. */ … … 1116 1116 1117 1117 uctablep->type = EXFAT_UCTABLE; 1118 uctablep->firstc = de->uctable.firstc;1118 uctablep->firstc = uint32_t_le2host(de->uctable.firstc); 1119 1119 uctablep->fragmented = true; 1120 1120 uctablep->idx->parent_fragmented = true; 1121 1121 uctablep->refcnt = 1; 1122 1122 uctablep->lnkcnt = 0; 1123 uctablep->size = de->uctable.size;1123 uctablep->size = uint64_t_le2host(de->uctable.size); 1124 1124 1125 1125 rc = exfat_directory_close(&di);
Note:
See TracChangeset
for help on using the changeset viewer.