Changeset 566c401 in mainline for uspace/lib/ext2/libext2.h
- Timestamp:
- 2011-02-13T20:37:31Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8bd5dad
- Parents:
- e272949
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext2/libext2.h
re272949 r566c401 1 1 /* 2 * Copyright (c) 201 0Martin Sucha2 * Copyright (c) 2011 Martin Sucha 3 3 * All rights reserved. 4 4 * … … 50 50 uint8_t unused2[12]; 51 51 uint16_t magic; // Magic value 52 } __attribute__ ((packed)) ext2_superblock_t; 52 53 53 // TODO: add __attribute__((aligned(...)) for better performance? 54 54 // (it is necessary to ensure the superblock is correctly aligned then 55 55 // though) 56 } __attribute__ ((packed)) ext2_superblock_t; 57 56 58 57 59 typedef struct ext2_filesystem { … … 66 68 EXT2_SUPERBLOCK_SIZE -1) 67 69 68 inline uint16_t ext2_superblock_get_magic(ext2_superblock_t * sb);69 inline uint32_t ext2_superblock_get_first_block(ext2_superblock_t * sb);70 inline uint32_t ext2_superblock_get_block_size_log2(ext2_superblock_t * sb);71 inline uint32_t ext2_superblock_get_block_size(ext2_superblock_t * sb);72 inline int32_t ext2_superblock_get_fragment_size_log2(ext2_superblock_t * sb);73 inline uint32_t ext2_superblock_get_fragment_size(ext2_superblock_t * sb);74 inline uint32_t ext2_superblock_get_blocks_per_group(ext2_superblock_t * sb);75 inline uint32_t ext2_superblock_get_fragments_per_group(ext2_superblock_t * sb);70 inline uint16_t ext2_superblock_get_magic(ext2_superblock_t *); 71 inline uint32_t ext2_superblock_get_first_block(ext2_superblock_t *); 72 inline uint32_t ext2_superblock_get_block_size_log2(ext2_superblock_t *); 73 inline uint32_t ext2_superblock_get_block_size(ext2_superblock_t *); 74 inline int32_t ext2_superblock_get_fragment_size_log2(ext2_superblock_t *); 75 inline uint32_t ext2_superblock_get_fragment_size(ext2_superblock_t *); 76 inline uint32_t ext2_superblock_get_blocks_per_group(ext2_superblock_t *); 77 inline uint32_t ext2_superblock_get_fragments_per_group(ext2_superblock_t *); 76 78 77 int ext2_superblock_read_direct(devmap_handle_t, ext2_superblock_t **);79 extern int ext2_superblock_read_direct(devmap_handle_t, ext2_superblock_t **); 78 80 79 int ext2_filesystem_init(ext2_filesystem_t *fs, devmap_handle_t dev);80 void ext2_filesystem_fini(ext2_filesystem_t *fs);81 extern int ext2_filesystem_init(ext2_filesystem_t *, devmap_handle_t); 82 extern void ext2_filesystem_fini(ext2_filesystem_t *); 81 83 82 84 #endif
Note:
See TracChangeset
for help on using the changeset viewer.