Ignore:
File:
1 edited

Legend:

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

    r18626b3 r260c052  
    4545 * @param de pointer to linked list directory entry
    4646 */
    47 uint32_t ext2_directory_entry_ll_get_inode(ext2_directory_entry_ll_t *de)
     47inline uint32_t ext2_directory_entry_ll_get_inode(ext2_directory_entry_ll_t *de)
    4848{
    4949        return uint32_t_le2host(de->inode);
     
    5555 * @param de pointer to linked list directory entry
    5656 */
    57 uint16_t ext2_directory_entry_ll_get_entry_length(
     57inline uint16_t ext2_directory_entry_ll_get_entry_length(
    5858    ext2_directory_entry_ll_t *de)
    5959{
     
    6666 * @param de pointer to linked list directory entry
    6767 */
    68 uint16_t ext2_directory_entry_ll_get_name_length(
     68inline uint16_t ext2_directory_entry_ll_get_name_length(
    6969    ext2_superblock_t *sb, ext2_directory_entry_ll_t *de)
    7070{
     
    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.