Changeset f6fa2c2 in mainline for uspace/lib/ext2/libext2_superblock.c
- Timestamp:
- 2011-02-14T20:24:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3949e8a0
- Parents:
- c00e729
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext2/libext2_superblock.c
rc00e729 rf6fa2c2 186 186 } 187 187 188 /** 189 * Get total inode count 190 * 191 * @param sb pointer to superblock 192 */ 193 inline uint32_t ext2_superblock_get_total_inode_count(ext2_superblock_t *sb) 194 { 195 return uint32_t_le2host(sb->total_inode_count); 196 } 197 198 /** 199 * Get total block count 200 * 201 * @param sb pointer to superblock 202 */ 203 inline uint32_t ext2_superblock_get_total_block_count(ext2_superblock_t *sb) 204 { 205 return uint32_t_le2host(sb->total_block_count); 206 } 207 208 /** 209 * Get amount of blocks reserved for the superuser 210 * 211 * @param sb pointer to superblock 212 */ 213 inline uint32_t ext2_superblock_get_reserved_block_count(ext2_superblock_t *sb) 214 { 215 return uint32_t_le2host(sb->reserved_block_count); 216 } 217 218 /** 219 * Get amount of free blocks 220 * 221 * @param sb pointer to superblock 222 */ 223 inline uint32_t ext2_superblock_get_free_block_count(ext2_superblock_t *sb) 224 { 225 return uint32_t_le2host(sb->free_block_count); 226 } 227 228 /** 229 * Get amount of free inodes 230 * 231 * @param sb pointer to superblock 232 */ 233 inline uint32_t ext2_superblock_get_free_inode_count(ext2_superblock_t *sb) 234 { 235 return uint32_t_le2host(sb->free_inode_count); 236 } 237 238 /** 239 * Get id of operating system that created the filesystem 240 * 241 * @param sb pointer to superblock 242 */ 243 inline uint32_t ext2_superblock_get_os(ext2_superblock_t *sb) 244 { 245 return uint32_t_le2host(sb->os); 246 } 188 247 189 248 /** Read a superblock directly from device (i.e. no libblock cache)
Note:
See TracChangeset
for help on using the changeset viewer.