Changeset 0dc91833 in mainline for uspace/lib/ext4/libext4_directory.h


Ignore:
Timestamp:
2011-10-26T11:41:21Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf9da656
Parents:
ab77928
Message:

splitted code because of very long source file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_directory.h

    rab77928 r0dc91833  
    6262
    6363
    64 /* Structures for indexed directory */
    65 
    66 typedef struct ext4_directory_dx_countlimit {
    67         uint16_t limit;
    68     uint16_t count;
    69 } ext4_directory_dx_countlimit_t;
    70 
    71 typedef struct ext4_directory_dx_dot_entry {
    72         uint32_t inode;
    73         uint16_t entry_length;
    74     uint8_t name_length;
    75     uint8_t inode_type;
    76     uint8_t name[4];
    77 } ext4_directory_dx_dot_entry_t;
    78 
    79 typedef struct ext4_directory_dx_root_info {
    80         uint32_t reserved_zero;
    81         uint8_t hash_version;
    82         uint8_t info_length;
    83         uint8_t indirect_levels;
    84         uint8_t unused_flags;
    85 } ext4_directory_dx_root_info_t;
    86 
    87 typedef struct ext4_directory_dx_entry {
    88         uint32_t hash;
    89         uint32_t block;
    90 } ext4_directory_dx_entry_t;
    91 
    92 typedef struct ext4_directory_dx_root {
    93                 ext4_directory_dx_dot_entry_t dots[2];
    94                 ext4_directory_dx_root_info_t info;
    95                 ext4_directory_dx_entry_t entries[0];
    96 } ext4_directory_dx_root_t;
    97 
    98 typedef struct ext4_directory_dx_node {
    99         struct fake_directory_entry {
    100                 uint32_t inode;
    101                 uint16_t entry_length;
    102             uint8_t name_length;
    103             uint8_t inode_type;
    104         } fake;
    105         ext4_directory_dx_entry_t entries[0];
    106 } ext4_directory_dx_node_t;
    107 
    108 
    109 typedef struct ext4_directory_dx_handle {
    110         block_t *block;
    111         ext4_directory_dx_entry_t *entries;
    112         ext4_directory_dx_entry_t *position;
    113 } ext4_directory_dx_handle_t;
    114 
    115 
    116 
    117 #define EXT4_ERR_BAD_DX_DIR                     (-75000)
    118 #define EXT4_DIRECTORY_HTREE_EOF        (uint32_t)0x7fffffff
    119 
    120 
    12164extern uint32_t ext4_directory_entry_ll_get_inode(ext4_directory_entry_ll_t *);
    12265extern uint16_t ext4_directory_entry_ll_get_entry_length(
     
    12568    ext4_superblock_t *, ext4_directory_entry_ll_t *);
    12669
    127 extern uint8_t ext4_directory_dx_root_info_get_hash_version(ext4_directory_dx_root_info_t *);
    128 extern uint8_t ext4_directory_dx_root_info_get_info_length(ext4_directory_dx_root_info_t *);
    129 extern uint8_t ext4_directory_dx_root_info_get_indirect_levels(ext4_directory_dx_root_info_t *);
    130 
    131 extern uint16_t ext4_directory_dx_countlimit_get_limit(ext4_directory_dx_countlimit_t *);
    132 extern uint16_t ext4_directory_dx_countlimit_get_count(ext4_directory_dx_countlimit_t *);
    133 
    134 extern uint32_t ext4_directory_dx_entry_get_hash(ext4_directory_dx_entry_t *);
    135 extern uint32_t ext4_directory_dx_entry_get_block(ext4_directory_dx_entry_t *);
    136 
    13770extern int ext4_directory_iterator_init(ext4_directory_iterator_t *,
    13871                ext4_filesystem_t *, ext4_inode_ref_t *, aoff64_t);
     
    14073extern int ext4_directory_iterator_seek(ext4_directory_iterator_t *, aoff64_t pos);
    14174extern int ext4_directory_iterator_fini(ext4_directory_iterator_t *);
    142 extern int ext4_directory_dx_find_entry(ext4_directory_iterator_t *,
    143                 ext4_filesystem_t *, ext4_inode_ref_t *, size_t, const char *);
    14475
    14576#endif
Note: See TracChangeset for help on using the changeset viewer.