Changeset c477c80 in mainline for uspace/srv/fs/udf


Ignore:
Timestamp:
2019-01-03T22:23:00Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
06412ba
Parents:
7acd787
Message:

Fix some common misspellings

Location:
uspace/srv/fs/udf
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/udf/udf.h

    r7acd787 rc477c80  
    7070        uint32_t access_type;
    7171        uint32_t start;
    72         uint32_t lenght;
     72        uint32_t length;
    7373} udf_partition_t;
    7474
     
    9191        udf_unallocated_space_descriptor_t *uasd;
    9292        uint64_t uaspace_start;
    93         uint64_t uaspace_lenght;
     93        uint64_t uaspace_length;
    9494        uint8_t space_type;
    9595} udf_instance_t;
  • uspace/srv/fs/udf/udf_file.c

    r7acd787 rc477c80  
    114114                        if ((node->index >= node->instance->partitions[i].start) &&
    115115                            (node->index < node->instance->partitions[i].start +
    116                             node->instance->partitions[i].lenght)) {
     116                            node->instance->partitions[i].length)) {
    117117                                if (node->instance->partitions[i].start >= min_start) {
    118118                                        min_start = node->instance->partitions[i].start;
     
    258258                            (udf_file_entry_descriptor_t *) block->data;
    259259                        uint16_t icb_flag = FLE16(file->icbtag.flags) & UDF_ICBFLAG_MASK;
    260                         node->data_size = FLE64(file->info_lenght);
     260                        node->data_size = FLE64(file->info_length);
    261261                        node->type = (file->icbtag.file_type == UDF_ICBTYPE_DIR) ? NODE_DIR : NODE_FILE;
    262262
    263263                        rc = udf_read_allocation_sequence(node, (uint8_t *) file, icb_flag,
    264                             FLE32(file->ea_lenght) + UDF_FE_OFFSET, FLE32(file->ad_lenght));
     264                            FLE32(file->ea_length) + UDF_FE_OFFSET, FLE32(file->ad_length));
    265265                        block_put(block);
    266266                        return rc;
     
    272272                            (udf_extended_file_entry_descriptor_t *) block->data;
    273273                        icb_flag = FLE16(efile->icbtag.flags) & UDF_ICBFLAG_MASK;
    274                         node->data_size = FLE64(efile->info_lenght);
     274                        node->data_size = FLE64(efile->info_length);
    275275                        node->type = (efile->icbtag.file_type == UDF_ICBTYPE_DIR) ? NODE_DIR : NODE_FILE;
    276276
    277277                        rc = udf_read_allocation_sequence(node, (uint8_t *) efile, icb_flag,
    278                             FLE32(efile->ea_lenght) + UDF_EFE_OFFSET, FLE32(efile->ad_lenght));
     278                            FLE32(efile->ea_length) + UDF_EFE_OFFSET, FLE32(efile->ad_length));
    279279                        block_put(block);
    280280                        return rc;
     
    338338
    339339                /* According to ECMA 167 4/14.4.9 */
    340                 size_t padding = 4 * (((*fid)->lenght_file_id +
    341                     FLE16((*fid)->lenght_iu) + 38 + 3) / 4) -
    342                     ((*fid)->lenght_file_id + FLE16((*fid)->lenght_iu) + 38);
    343                 size_t size_fid = (*fid)->lenght_file_id +
    344                     FLE16((*fid)->lenght_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;
    345345
    346346                fid_sum += size_fid;
    347347
    348348                /* aAcording to ECMA 167 4/8.6 */
    349                 if (((*fid)->lenght_file_id != 0) &&
     349                if (((*fid)->length_file_id != 0) &&
    350350                    (((*fid)->file_characteristics & 4) == 0)) {
    351351                        n++;
     
    516516
    517517                        /* According to ECMA 167 4/14.4.9 */
    518                         size_t padding = 4 * (((*fid)->lenght_file_id +
    519                             FLE16((*fid)->lenght_iu) + 38 + 3) / 4) -
    520                             ((*fid)->lenght_file_id + FLE16((*fid)->lenght_iu) + 38);
    521                         size_t size_fid = (*fid)->lenght_file_id +
    522                             FLE16((*fid)->lenght_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;
    523523                        if (buf_flag)
    524524                                fid_sum += size_fid - *len;
     
    527527
    528528                        /* According to ECMA 167 4/8.6 */
    529                         if (((*fid)->lenght_file_id != 0) &&
     529                        if (((*fid)->length_file_id != 0) &&
    530530                            (((*fid)->file_characteristics & 4) == 0)) {
    531531                                (*n)++;
  • uspace/srv/fs/udf/udf_file.h

    r7acd787 rc477c80  
    9999        uint16_t file_version_number;
    100100        uint8_t file_characteristics;
    101         uint8_t lenght_file_id;
     101        uint8_t length_file_id;
    102102        udf_long_ad_t icb;
    103         uint16_t lenght_iu;
     103        uint16_t length_iu;
    104104        uint8_t implementation_use[0];
    105105        udf_dstring file_id[0];
     
    128128        uint8_t record_format;
    129129        uint8_t record_display_attributes;
    130         uint32_t record_lenght;
    131         uint64_t info_lenght;
     130        uint32_t record_length;
     131        uint64_t info_length;
    132132        uint64_t lblocks_recorded;
    133133        udf_timestamp_t access_data_and_time;
     
    138138        udf_regid_t implementation_id;
    139139        uint64_t unique_id;
    140         uint32_t ea_lenght;
    141         uint32_t ad_lenght;
     140        uint32_t ea_length;
     141        uint32_t ad_length;
    142142        uint8_t extended_attributes [0];
    143143        uint8_t allocation_descriptors[0];
     
    154154        uint8_t record_format;
    155155        uint8_t record_display_attributes;
    156         uint32_t record_lenght;
    157         uint64_t info_lenght;
     156        uint32_t record_length;
     157        uint64_t info_length;
    158158        uint64_t object_size;
    159159        uint64_t lblocks_recorded;
     
    166166        udf_regid_t implementation_id;
    167167        uint64_t unique_id;
    168         uint32_t ea_lenght;
    169         uint32_t ad_lenght;
     168        uint32_t ea_length;
     169        uint32_t ad_length;
    170170        uint8_t extended_attributes [0];
    171171        uint8_t allocation_descriptors[0];
     
    182182        udf_descriptor_tag_t tag;
    183183        udf_icbtag_t icbtag;
    184         uint32_t ad_lenght;
     184        uint32_t ad_length;
    185185        uint8_t allocation_descriptors[0];
    186186} __attribute__((packed)) udf_unallocated_space_entry_descriptor_t;
  • uspace/srv/fs/udf/udf_ops.c

    r7acd787 rc477c80  
    128128
    129129                udf_to_unix_name(name, MAX_FILE_NAME_LEN,
    130                     (char *) fid->implementation_use + FLE16(fid->lenght_iu),
    131                     fid->lenght_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);
    132132
    133133                if (str_casecmp(name, component) == 0) {
     
    502502
    503503                        udf_to_unix_name(name, MAX_FILE_NAME_LEN,
    504                             (char *) fid->implementation_use + FLE16(fid->lenght_iu),
    505                             fid->lenght_file_id, &node->instance->charset);
     504                            (char *) fid->implementation_use + FLE16(fid->length_iu),
     505                            fid->length_file_id, &node->instance->charset);
    506506
    507507                        async_data_read_finalize(&call, name, str_size(name) + 1);
  • uspace/srv/fs/udf/udf_volume.c

    r7acd787 rc477c80  
    386386                udf_file_entry_descriptor_t *fed =
    387387                    (udf_file_entry_descriptor_t *) block->data;
    388                 uint32_t start_alloc = FLE32(fed->ea_lenght) + UDF_FE_OFFSET;
     388                uint32_t start_alloc = FLE32(fed->ea_length) + UDF_FE_OFFSET;
    389389                udf_short_ad_t *short_d =
    390390                    (udf_short_ad_t *) ((uint8_t *) fed + start_alloc);
    391391                instance->partitions[id].start = FLE32(short_d->position);
    392                 instance->partitions[id].lenght = FLE32(short_d->length);
     392                instance->partitions[id].length = FLE32(short_d->length);
    393393                break;
    394394
     
    398398                udf_extended_file_entry_descriptor_t *efed =
    399399                    (udf_extended_file_entry_descriptor_t *) block->data;
    400                 start_alloc = FLE32(efed->ea_lenght) + UDF_EFE_OFFSET;
     400                start_alloc = FLE32(efed->ea_length) + UDF_EFE_OFFSET;
    401401                short_d = (udf_short_ad_t *) ((uint8_t *) efed + start_alloc);
    402402                instance->partitions[id].start = FLE32(short_d->position);
    403                 instance->partitions[id].lenght = FLE32(short_d->length);
     403                instance->partitions[id].length = FLE32(short_d->length);
    404404                break;
    405405        }
     
    503503                                instance->partitions[j].access_type =
    504504                                    FLE32(pd[pd_num].access_type);
    505                                 instance->partitions[j].lenght =
     505                                instance->partitions[j].length =
    506506                                    FLE32(pd[pd_num].length);
    507507                                instance->partitions[j].number =
     
    518518
    519519                                instance->volumes[i].partition_cnt++;
    520                                 idx += pm1->partition_map_lenght;
     520                                idx += pm1->partition_map_length;
    521521                                continue;
    522522                        }
     
    586586                            "found and skipped", i, pm->partition_map_type);
    587587
    588                         idx += pm->partition_map_lenght;
     588                        idx += pm->partition_map_length;
    589589                }
    590590        }
     
    710710                                    FLE32(vol->partition.starting_location) +
    711711                                    FLE32(phd->unallocated_space_table.position);
    712                                 instance->uaspace_lenght =
     712                                instance->uaspace_length =
    713713                                    FLE32(phd->unallocated_space_table.length);
    714714                        }
     
    724724                                    FLE32(vol->partition.starting_location) +
    725725                                    FLE32(phd->unallocated_space_bitmap.position);
    726                                 instance->uaspace_lenght =
     726                                instance->uaspace_length =
    727727                                    FLE32(phd->unallocated_space_bitmap.length);
    728728                        }
     
    773773                            sizeof(udf_extent_t)), sizeof(udf_common_descriptor_t));
    774774                        instance->uaspace_start = pos;
    775                         instance->uaspace_lenght = sct;
     775                        instance->uaspace_length = sct;
    776776                        instance->uasd = (udf_unallocated_space_descriptor_t *)
    777777                            malloc(sct * instance->sector_size);
  • uspace/srv/fs/udf/udf_volume.h

    r7acd787 rc477c80  
    4949#define UDF_TAG_LVID  0x0009  /* Logical Volume Integrity Descriptor */
    5050
    51 /* Start adress of Anchor Volume Descriptor */
     51/* Start address of Anchor Volume Descriptor */
    5252#define UDF_AVDP_SECTOR  256
    5353
     
    165165typedef struct udf_general_type {
    166166        uint8_t partition_map_type;
    167         uint8_t partition_map_lenght;
     167        uint8_t partition_map_length;
    168168} __attribute__((packed)) udf_general_type_t;
    169169
    170170typedef struct udf_type1_partition_map {
    171171        uint8_t partition_map_type;
    172         uint8_t partition_map_lenght;
     172        uint8_t partition_map_length;
    173173        uint16_t volume_sequence_number;
    174174        uint16_t partition_number;
Note: See TracChangeset for help on using the changeset viewer.