Changeset 9c0c0e1 in mainline for uspace/lib/ext4/libext4_superblock.c
- Timestamp:
- 2011-10-04T12:18:44Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a23297c
- Parents:
- 01ab41b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_superblock.c
r01ab41b r9c0c0e1 45 45 * TODO doxy 46 46 */ 47 uint16_t ext 2_superblock_get_magic(ext4_superblock_t *sb)47 uint16_t ext4_superblock_get_magic(ext4_superblock_t *sb) 48 48 { 49 return uint16_t_le2host(sb-> s_magic);49 return uint16_t_le2host(sb->magic); 50 50 } 51 51 … … 55 55 uint32_t ext4_superblock_get_first_block(ext4_superblock_t *sb) 56 56 { 57 return uint32_t_le2host(sb-> s_first_data_block);57 return uint32_t_le2host(sb->first_data_block); 58 58 } 59 59 … … 63 63 uint32_t ext4_superblock_get_block_size_log2(ext4_superblock_t *sb) 64 64 { 65 return uint32_t_le2host(sb-> s_log_block_size);65 return uint32_t_le2host(sb->log_block_size); 66 66 } 67 67 … … 72 72 { 73 73 return 1024 << ext4_superblock_get_block_size_log2(sb); 74 } 75 76 /** 77 * TODO doxy 78 */ 79 uint32_t ext4_superblock_get_rev_level(ext4_superblock_t *sb) 80 { 81 return uint32_t_le2host(sb->rev_level); 82 } 83 84 /** 85 * TODO doxy 86 */ 87 uint32_t ext4_superblock_get_features_compatible(ext4_superblock_t *sb) 88 { 89 return uint32_t_le2host(sb->features_compatible); 90 } 91 92 /** 93 * TODO doxy 94 */ 95 uint32_t ext4_superblock_get_features_incompatible(ext4_superblock_t *sb) 96 { 97 return uint32_t_le2host(sb->features_incompatible); 98 } 99 100 /** 101 * TODO doxy 102 */ 103 uint32_t ext4_superblock_get_features_read_only(ext4_superblock_t *sb) 104 { 105 return uint32_t_le2host(sb->features_read_only); 74 106 } 75 107 … … 107 139 int ext4_superblock_check_sanity(ext4_superblock_t *sb) 108 140 { 109 // TODO 141 if (ext4_superblock_get_magic(sb) != EXT4_SUPERBLOCK_MAGIC) { 142 return ENOTSUP; 143 } 144 145 // TODO more checks !!! 146 110 147 return EOK; 111 148 }
Note:
See TracChangeset
for help on using the changeset viewer.