Changeset c477c80 in mainline for uspace/srv/fs/udf
- Timestamp:
- 2019-01-03T22:23:00Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 06412ba
- Parents:
- 7acd787
- Location:
- uspace/srv/fs/udf
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/udf/udf.h
r7acd787 rc477c80 70 70 uint32_t access_type; 71 71 uint32_t start; 72 uint32_t leng ht;72 uint32_t length; 73 73 } udf_partition_t; 74 74 … … 91 91 udf_unallocated_space_descriptor_t *uasd; 92 92 uint64_t uaspace_start; 93 uint64_t uaspace_leng ht;93 uint64_t uaspace_length; 94 94 uint8_t space_type; 95 95 } udf_instance_t; -
uspace/srv/fs/udf/udf_file.c
r7acd787 rc477c80 114 114 if ((node->index >= node->instance->partitions[i].start) && 115 115 (node->index < node->instance->partitions[i].start + 116 node->instance->partitions[i].leng ht)) {116 node->instance->partitions[i].length)) { 117 117 if (node->instance->partitions[i].start >= min_start) { 118 118 min_start = node->instance->partitions[i].start; … … 258 258 (udf_file_entry_descriptor_t *) block->data; 259 259 uint16_t icb_flag = FLE16(file->icbtag.flags) & UDF_ICBFLAG_MASK; 260 node->data_size = FLE64(file->info_leng ht);260 node->data_size = FLE64(file->info_length); 261 261 node->type = (file->icbtag.file_type == UDF_ICBTYPE_DIR) ? NODE_DIR : NODE_FILE; 262 262 263 263 rc = udf_read_allocation_sequence(node, (uint8_t *) file, icb_flag, 264 FLE32(file->ea_leng ht) + UDF_FE_OFFSET, FLE32(file->ad_lenght));264 FLE32(file->ea_length) + UDF_FE_OFFSET, FLE32(file->ad_length)); 265 265 block_put(block); 266 266 return rc; … … 272 272 (udf_extended_file_entry_descriptor_t *) block->data; 273 273 icb_flag = FLE16(efile->icbtag.flags) & UDF_ICBFLAG_MASK; 274 node->data_size = FLE64(efile->info_leng ht);274 node->data_size = FLE64(efile->info_length); 275 275 node->type = (efile->icbtag.file_type == UDF_ICBTYPE_DIR) ? NODE_DIR : NODE_FILE; 276 276 277 277 rc = udf_read_allocation_sequence(node, (uint8_t *) efile, icb_flag, 278 FLE32(efile->ea_leng ht) + UDF_EFE_OFFSET, FLE32(efile->ad_lenght));278 FLE32(efile->ea_length) + UDF_EFE_OFFSET, FLE32(efile->ad_length)); 279 279 block_put(block); 280 280 return rc; … … 338 338 339 339 /* According to ECMA 167 4/14.4.9 */ 340 size_t padding = 4 * (((*fid)->leng ht_file_id +341 FLE16((*fid)->leng ht_iu) + 38 + 3) / 4) -342 ((*fid)->leng ht_file_id + FLE16((*fid)->lenght_iu) + 38);343 size_t size_fid = (*fid)->leng ht_file_id +344 FLE16((*fid)->leng ht_iu) + padding + 38;340 size_t padding = 4 * (((*fid)->length_file_id + 341 FLE16((*fid)->length_iu) + 38 + 3) / 4) - 342 ((*fid)->length_file_id + FLE16((*fid)->length_iu) + 38); 343 size_t size_fid = (*fid)->length_file_id + 344 FLE16((*fid)->length_iu) + padding + 38; 345 345 346 346 fid_sum += size_fid; 347 347 348 348 /* aAcording to ECMA 167 4/8.6 */ 349 if (((*fid)->leng ht_file_id != 0) &&349 if (((*fid)->length_file_id != 0) && 350 350 (((*fid)->file_characteristics & 4) == 0)) { 351 351 n++; … … 516 516 517 517 /* According to ECMA 167 4/14.4.9 */ 518 size_t padding = 4 * (((*fid)->leng ht_file_id +519 FLE16((*fid)->leng ht_iu) + 38 + 3) / 4) -520 ((*fid)->leng ht_file_id + FLE16((*fid)->lenght_iu) + 38);521 size_t size_fid = (*fid)->leng ht_file_id +522 FLE16((*fid)->leng ht_iu) + padding + 38;518 size_t padding = 4 * (((*fid)->length_file_id + 519 FLE16((*fid)->length_iu) + 38 + 3) / 4) - 520 ((*fid)->length_file_id + FLE16((*fid)->length_iu) + 38); 521 size_t size_fid = (*fid)->length_file_id + 522 FLE16((*fid)->length_iu) + padding + 38; 523 523 if (buf_flag) 524 524 fid_sum += size_fid - *len; … … 527 527 528 528 /* According to ECMA 167 4/8.6 */ 529 if (((*fid)->leng ht_file_id != 0) &&529 if (((*fid)->length_file_id != 0) && 530 530 (((*fid)->file_characteristics & 4) == 0)) { 531 531 (*n)++; -
uspace/srv/fs/udf/udf_file.h
r7acd787 rc477c80 99 99 uint16_t file_version_number; 100 100 uint8_t file_characteristics; 101 uint8_t leng ht_file_id;101 uint8_t length_file_id; 102 102 udf_long_ad_t icb; 103 uint16_t leng ht_iu;103 uint16_t length_iu; 104 104 uint8_t implementation_use[0]; 105 105 udf_dstring file_id[0]; … … 128 128 uint8_t record_format; 129 129 uint8_t record_display_attributes; 130 uint32_t record_leng ht;131 uint64_t info_leng ht;130 uint32_t record_length; 131 uint64_t info_length; 132 132 uint64_t lblocks_recorded; 133 133 udf_timestamp_t access_data_and_time; … … 138 138 udf_regid_t implementation_id; 139 139 uint64_t unique_id; 140 uint32_t ea_leng ht;141 uint32_t ad_leng ht;140 uint32_t ea_length; 141 uint32_t ad_length; 142 142 uint8_t extended_attributes [0]; 143 143 uint8_t allocation_descriptors[0]; … … 154 154 uint8_t record_format; 155 155 uint8_t record_display_attributes; 156 uint32_t record_leng ht;157 uint64_t info_leng ht;156 uint32_t record_length; 157 uint64_t info_length; 158 158 uint64_t object_size; 159 159 uint64_t lblocks_recorded; … … 166 166 udf_regid_t implementation_id; 167 167 uint64_t unique_id; 168 uint32_t ea_leng ht;169 uint32_t ad_leng ht;168 uint32_t ea_length; 169 uint32_t ad_length; 170 170 uint8_t extended_attributes [0]; 171 171 uint8_t allocation_descriptors[0]; … … 182 182 udf_descriptor_tag_t tag; 183 183 udf_icbtag_t icbtag; 184 uint32_t ad_leng ht;184 uint32_t ad_length; 185 185 uint8_t allocation_descriptors[0]; 186 186 } __attribute__((packed)) udf_unallocated_space_entry_descriptor_t; -
uspace/srv/fs/udf/udf_ops.c
r7acd787 rc477c80 128 128 129 129 udf_to_unix_name(name, MAX_FILE_NAME_LEN, 130 (char *) fid->implementation_use + FLE16(fid->leng ht_iu),131 fid->leng ht_file_id, &UDF_NODE(pfn)->instance->charset);130 (char *) fid->implementation_use + FLE16(fid->length_iu), 131 fid->length_file_id, &UDF_NODE(pfn)->instance->charset); 132 132 133 133 if (str_casecmp(name, component) == 0) { … … 502 502 503 503 udf_to_unix_name(name, MAX_FILE_NAME_LEN, 504 (char *) fid->implementation_use + FLE16(fid->leng ht_iu),505 fid->leng ht_file_id, &node->instance->charset);504 (char *) fid->implementation_use + FLE16(fid->length_iu), 505 fid->length_file_id, &node->instance->charset); 506 506 507 507 async_data_read_finalize(&call, name, str_size(name) + 1); -
uspace/srv/fs/udf/udf_volume.c
r7acd787 rc477c80 386 386 udf_file_entry_descriptor_t *fed = 387 387 (udf_file_entry_descriptor_t *) block->data; 388 uint32_t start_alloc = FLE32(fed->ea_leng ht) + UDF_FE_OFFSET;388 uint32_t start_alloc = FLE32(fed->ea_length) + UDF_FE_OFFSET; 389 389 udf_short_ad_t *short_d = 390 390 (udf_short_ad_t *) ((uint8_t *) fed + start_alloc); 391 391 instance->partitions[id].start = FLE32(short_d->position); 392 instance->partitions[id].leng ht= FLE32(short_d->length);392 instance->partitions[id].length = FLE32(short_d->length); 393 393 break; 394 394 … … 398 398 udf_extended_file_entry_descriptor_t *efed = 399 399 (udf_extended_file_entry_descriptor_t *) block->data; 400 start_alloc = FLE32(efed->ea_leng ht) + UDF_EFE_OFFSET;400 start_alloc = FLE32(efed->ea_length) + UDF_EFE_OFFSET; 401 401 short_d = (udf_short_ad_t *) ((uint8_t *) efed + start_alloc); 402 402 instance->partitions[id].start = FLE32(short_d->position); 403 instance->partitions[id].leng ht= FLE32(short_d->length);403 instance->partitions[id].length = FLE32(short_d->length); 404 404 break; 405 405 } … … 503 503 instance->partitions[j].access_type = 504 504 FLE32(pd[pd_num].access_type); 505 instance->partitions[j].leng ht=505 instance->partitions[j].length = 506 506 FLE32(pd[pd_num].length); 507 507 instance->partitions[j].number = … … 518 518 519 519 instance->volumes[i].partition_cnt++; 520 idx += pm1->partition_map_leng ht;520 idx += pm1->partition_map_length; 521 521 continue; 522 522 } … … 586 586 "found and skipped", i, pm->partition_map_type); 587 587 588 idx += pm->partition_map_leng ht;588 idx += pm->partition_map_length; 589 589 } 590 590 } … … 710 710 FLE32(vol->partition.starting_location) + 711 711 FLE32(phd->unallocated_space_table.position); 712 instance->uaspace_leng ht=712 instance->uaspace_length = 713 713 FLE32(phd->unallocated_space_table.length); 714 714 } … … 724 724 FLE32(vol->partition.starting_location) + 725 725 FLE32(phd->unallocated_space_bitmap.position); 726 instance->uaspace_leng ht=726 instance->uaspace_length = 727 727 FLE32(phd->unallocated_space_bitmap.length); 728 728 } … … 773 773 sizeof(udf_extent_t)), sizeof(udf_common_descriptor_t)); 774 774 instance->uaspace_start = pos; 775 instance->uaspace_leng ht= sct;775 instance->uaspace_length = sct; 776 776 instance->uasd = (udf_unallocated_space_descriptor_t *) 777 777 malloc(sct * instance->sector_size); -
uspace/srv/fs/udf/udf_volume.h
r7acd787 rc477c80 49 49 #define UDF_TAG_LVID 0x0009 /* Logical Volume Integrity Descriptor */ 50 50 51 /* Start ad ress of Anchor Volume Descriptor */51 /* Start address of Anchor Volume Descriptor */ 52 52 #define UDF_AVDP_SECTOR 256 53 53 … … 165 165 typedef struct udf_general_type { 166 166 uint8_t partition_map_type; 167 uint8_t partition_map_leng ht;167 uint8_t partition_map_length; 168 168 } __attribute__((packed)) udf_general_type_t; 169 169 170 170 typedef struct udf_type1_partition_map { 171 171 uint8_t partition_map_type; 172 uint8_t partition_map_leng ht;172 uint8_t partition_map_length; 173 173 uint16_t volume_sequence_number; 174 174 uint16_t partition_number;
Note:
See TracChangeset
for help on using the changeset viewer.