Changeset fb04cd90 in mainline for uspace/lib/ext4/libext4_block_group.c
- Timestamp:
- 2012-05-28T09:56:44Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4585bda
- Parents:
- d0c9b4b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_block_group.c
rd0c9b4b rfb04cd90 48 48 ext4_superblock_t *sb) 49 49 { 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) { 51 51 return ((uint64_t)uint32_t_le2host(bg->block_bitmap_hi) << 32) | 52 52 uint32_t_le2host(bg->block_bitmap_lo); … … 67 67 bg->block_bitmap_lo = host2uint32_t_le((block_bitmap << 32) >> 32); 68 68 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) { 70 70 bg->block_bitmap_hi = host2uint32_t_le(block_bitmap >> 32); 71 71 } … … 81 81 ext4_superblock_t *sb) 82 82 { 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) { 84 84 return ((uint64_t)uint32_t_le2host(bg->inode_bitmap_hi) << 32) | 85 85 uint32_t_le2host(bg->inode_bitmap_lo); … … 101 101 bg->inode_bitmap_lo = host2uint32_t_le((inode_bitmap << 32) >> 32); 102 102 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) { 104 104 bg->inode_bitmap_hi = host2uint32_t_le(inode_bitmap >> 32); 105 105 } … … 115 115 ext4_superblock_t *sb) 116 116 { 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) { 118 118 return ((uint64_t)uint32_t_le2host(bg->inode_table_first_block_hi) << 32) | 119 119 uint32_t_le2host(bg->inode_table_first_block_lo); … … 136 136 137 137 if (ext4_superblock_get_desc_size(sb) > 138 EXT4_ BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {138 EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) { 139 139 140 140 bg->inode_table_first_block_hi = … … 153 153 { 154 154 if (ext4_superblock_get_desc_size(sb) > 155 EXT4_ BLOCK_MIN_GROUP_DESCRIPTOR_SIZE) {155 EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE) { 156 156 157 157 return ((uint32_t)uint16_t_le2host(bg->free_blocks_count_hi) << 16) | … … 172 172 { 173 173 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) { 175 175 bg->free_blocks_count_hi = host2uint16_t_le(value >> 16); 176 176 } … … 186 186 ext4_superblock_t *sb) 187 187 { 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) { 189 189 return ((uint32_t)uint16_t_le2host(bg->free_inodes_count_hi) << 16) | 190 190 uint16_t_le2host(bg->free_inodes_count_lo); … … 204 204 { 205 205 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) { 207 207 bg->free_inodes_count_hi = host2uint16_t_le(value >> 16); 208 208 } … … 218 218 ext4_superblock_t *sb) 219 219 { 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) { 221 221 return ((uint32_t)uint16_t_le2host(bg->used_dirs_count_hi) << 16) | 222 222 uint16_t_le2host(bg->used_dirs_count_lo); … … 236 236 { 237 237 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) { 239 239 bg->used_dirs_count_hi = host2uint16_t_le(count >> 16); 240 240 } … … 270 270 ext4_superblock_t *sb) 271 271 { 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) { 273 273 return ((uint32_t)uint16_t_le2host(bg->itable_unused_hi) << 16) | 274 274 uint16_t_le2host(bg->itable_unused_lo); … … 288 288 { 289 289 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) { 291 291 bg->itable_unused_hi = host2uint16_t_le(value >> 16); 292 292 }
Note:
See TracChangeset
for help on using the changeset viewer.