Changeset 8565a42 in mainline for uspace/lib/ext4/src/inode.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/src/inode.c

    r3061bc1 r8565a42  
    5353        uint32_t bits = 8;
    5454        uint32_t size = block_size;
    55        
     55
    5656        do {
    5757                bits++;
    5858                size = size >> 1;
    5959        } while (size > 256);
    60        
     60
    6161        return bits;
    6262}
     
    7676                    ((uint32_t) uint16_t_le2host(inode->mode));
    7777        }
    78        
     78
    7979        return uint16_t_le2host(inode->mode);
    8080}
     
    9090{
    9191        inode->mode = host2uint16_t_le((mode << 16) >> 16);
    92        
     92
    9393        if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_HURD)
    9494                inode->osd2.hurd2.mode_high = host2uint16_t_le(mode >> 16);
     
    129129{
    130130        uint32_t major_rev = ext4_superblock_get_rev_level(sb);
    131        
     131
    132132        if ((major_rev > 0) &&
    133133            (ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_FILE)))
    134134                return ((uint64_t)uint32_t_le2host(inode->size_hi)) << 32 |
    135135                    ((uint64_t)uint32_t_le2host(inode->size_lo));
    136        
     136
    137137        return uint32_t_le2host(inode->size_lo);
    138138}
     
    304304                    uint16_t_le2host(inode->osd2.linux2.blocks_high)) << 32 |
    305305                    uint32_t_le2host(inode->blocks_count_lo);
    306                
     306
    307307                if (ext4_inode_has_flag(inode, EXT4_INODE_FLAG_HUGE_FILE)) {
    308308                        uint32_t block_size = ext4_superblock_get_block_size(sb);
     
    330330        uint64_t max = 0;
    331331        max = ~max >> 32;
    332        
     332
    333333        if (count <= max) {
    334334                inode->blocks_count_lo = host2uint32_t_le(count);
    335335                inode->osd2.linux2.blocks_high = 0;
    336336                ext4_inode_clear_flag(inode, EXT4_INODE_FLAG_HUGE_FILE);
    337                
     337
    338338                return EOK;
    339339        }
    340        
     340
    341341        /* Check if there can be used huge files (many blocks) */
    342342        if (!ext4_superblock_has_feature_read_only(sb,
    343343            EXT4_FEATURE_RO_COMPAT_HUGE_FILE))
    344344                return EINVAL;
    345        
     345
    346346        /* 48-bit maximum */
    347347        max = 0;
    348348        max = ~max >> 16;
    349        
     349
    350350        if (count <= max) {
    351351                inode->blocks_count_lo = host2uint32_t_le(count);
     
    360360                inode->osd2.linux2.blocks_high = host2uint16_t_le(count >> 32);
    361361        }
    362        
     362
    363363        return EOK;
    364364}
     
    424424                    uint16_t_le2host(inode->osd2.linux2.file_acl_high)) << 16 |
    425425                    (uint32_t_le2host(inode->file_acl_lo));
    426        
     426
    427427        return uint32_t_le2host(inode->file_acl_lo);
    428428}
     
    439439{
    440440        inode->file_acl_lo = host2uint32_t_le((file_acl << 32) >> 32);
    441        
     441
    442442        if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_LINUX)
    443443                inode->osd2.linux2.file_acl_high = host2uint16_t_le(file_acl >> 32);
     
    455455{
    456456        assert(idx < EXT4_INODE_DIRECT_BLOCK_COUNT);
    457        
     457
    458458        return uint32_t_le2host(inode->blocks[idx]);
    459459}
     
    469469{
    470470        assert(idx < EXT4_INODE_DIRECT_BLOCK_COUNT);
    471        
     471
    472472        inode->blocks[idx] = host2uint32_t_le(fblock);
    473473}
     
    540540        if (ext4_inode_get_flags(inode) & flag)
    541541                return true;
    542        
     542
    543543        return false;
    544544}
     
    583583            (ext4_inode_has_flag(inode, EXT4_INODE_FLAG_IMMUTABLE)))
    584584                return false;
    585        
     585
    586586        if ((ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_FILE)) ||
    587587            (ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_DIRECTORY)))
    588588                return true;
    589        
     589
    590590        return false;
    591591}
Note: See TracChangeset for help on using the changeset viewer.