Ignore:
Timestamp:
2012-05-28T09:56:44Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4585bda
Parents:
d0c9b4b
Message:

checks by mount operation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_block_group.c

    rd0c9b4b rfb04cd90  
    4848                ext4_superblock_t *sb)
    4949{
    50         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     50        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    5151                return ((uint64_t)uint32_t_le2host(bg->block_bitmap_hi) << 32) |
    5252                        uint32_t_le2host(bg->block_bitmap_lo);
     
    6767        bg->block_bitmap_lo = host2uint32_t_le((block_bitmap << 32) >> 32);
    6868
    69         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     69        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    7070                bg->block_bitmap_hi = host2uint32_t_le(block_bitmap >> 32);
    7171        }
     
    8181                ext4_superblock_t *sb)
    8282{
    83         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     83        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    8484                return ((uint64_t)uint32_t_le2host(bg->inode_bitmap_hi) << 32) |
    8585                        uint32_t_le2host(bg->inode_bitmap_lo);
     
    101101        bg->inode_bitmap_lo = host2uint32_t_le((inode_bitmap << 32) >> 32);
    102102
    103         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     103        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    104104                bg->inode_bitmap_hi = host2uint32_t_le(inode_bitmap >> 32);
    105105        }
     
    115115                ext4_superblock_t *sb)
    116116{
    117         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     117        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    118118                return ((uint64_t)uint32_t_le2host(bg->inode_table_first_block_hi) << 32) |
    119119                        uint32_t_le2host(bg->inode_table_first_block_lo);
     
    136136
    137137        if (ext4_superblock_get_desc_size(sb) >
    138                         EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     138                        EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    139139
    140140                bg->inode_table_first_block_hi =
     
    153153{
    154154        if (ext4_superblock_get_desc_size(sb) >
    155                         EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     155                        EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    156156
    157157                return ((uint32_t)uint16_t_le2host(bg->free_blocks_count_hi) << 16) |
     
    172172{
    173173        bg->free_blocks_count_lo = host2uint16_t_le((value << 16) >> 16);
    174         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     174        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    175175                bg->free_blocks_count_hi = host2uint16_t_le(value >> 16);
    176176        }
     
    186186                ext4_superblock_t *sb)
    187187{
    188         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     188        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    189189                return ((uint32_t)uint16_t_le2host(bg->free_inodes_count_hi) << 16) |
    190190                        uint16_t_le2host(bg->free_inodes_count_lo);
     
    204204{
    205205        bg->free_inodes_count_lo = host2uint16_t_le((value << 16) >> 16);
    206         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     206        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    207207                bg->free_inodes_count_hi = host2uint16_t_le(value >> 16);
    208208        }
     
    218218                ext4_superblock_t *sb)
    219219{
    220         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     220        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    221221                return ((uint32_t)uint16_t_le2host(bg->used_dirs_count_hi) << 16) |
    222222                        uint16_t_le2host(bg->used_dirs_count_lo);
     
    236236{
    237237        bg->used_dirs_count_lo = host2uint16_t_le((count << 16) >> 16);
    238         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     238        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    239239                bg->used_dirs_count_hi = host2uint16_t_le(count >> 16);
    240240        }
     
    270270                ext4_superblock_t *sb)
    271271{
    272         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     272        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    273273                return ((uint32_t)uint16_t_le2host(bg->itable_unused_hi) << 16) |
    274274                        uint16_t_le2host(bg->itable_unused_lo);
     
    288288{
    289289        bg->itable_unused_lo = host2uint16_t_le((value << 16) >> 16);
    290         if (ext4_superblock_get_desc_size(sb) > EXT4_BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {
     290        if (ext4_superblock_get_desc_size(sb) > EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) {
    291291                bg->itable_unused_hi = host2uint16_t_le(value >> 16);
    292292        }
Note: See TracChangeset for help on using the changeset viewer.