Changeset 6a7e497 in mainline for uspace/lib/ext2/libext2_directory.c


Ignore:
Timestamp:
2011-06-02T19:05:17Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
16b2ea8
Parents:
18626b3 (diff), d030e0c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with the original ext2 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext2/libext2_directory.c

    r18626b3 r6a7e497  
    9393        it->fs = fs;
    9494       
    95         // Get the first data block, so we can get first entry
     95        /* Get the first data block, so we can get the first entry */
    9696        rc = ext2_filesystem_get_inode_data_block_index(fs, inode_ref->inode, 0,
    9797            &block_id);
     
    133133        size = ext2_inode_get_size(it->fs->superblock, it->inode_ref->inode);
    134134       
    135         // Are we at the end?
     135        /* Are we at the end? */
    136136        if (it->current_offset + skip >= size) {
    137137                rc = block_put(it->current_block);
     
    150150        next_block_idx = (it->current_offset + skip) / block_size;
    151151       
    152         // If we are moving accross block boundary,
    153         // we need to get another block
     152        /* If we are moving accross block boundary,
     153         * we need to get another block
     154         */
    154155        if (current_block_idx != next_block_idx) {
    155156                rc = block_put(it->current_block);
     
    176177        offset_in_block = (it->current_offset + skip) % block_size;
    177178       
    178         // Ensure proper alignment
     179        /* Ensure proper alignment */
    179180        if ((offset_in_block % 4) != 0) {
    180181                it->current = NULL;
     
    182183        }
    183184       
    184         // Ensure that the core of the entry does not overflow the block
     185        /* Ensure that the core of the entry does not overflow the block */
    185186        if (offset_in_block > block_size - 8) {
    186187                it->current = NULL;
     
    191192        it->current_offset += skip;
    192193       
    193         // Ensure that the whole entry does not overflow the block
     194        /* Ensure that the whole entry does not overflow the block */
    194195        skip = ext2_directory_entry_ll_get_entry_length(it->current);
    195196        if (offset_in_block + skip > block_size) {
     
    198199        }
    199200       
    200         // Ensure the name length is not too large
     201        /* Ensure the name length is not too large */
    201202        if (ext2_directory_entry_ll_get_name_length(it->fs->superblock,
    202203            it->current) > skip-8) {
Note: See TracChangeset for help on using the changeset viewer.