Ignore:
Timestamp:
2012-04-18T08:32:35Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e6f6260
Parents:
f22d5ef0
Message:

comments for getters and setters in dir index

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_directory_index.c

    rf22d5ef0 rdb8fb43  
    4343#include "libext4.h"
    4444
     45/** Type entry to pass to sorting algorithm.
     46 *
     47 */
    4548typedef struct ext4_dx_sort_entry {
    4649        uint32_t hash;
     
    5053
    5154
     55/** Get hash version used in directory index.
     56 *
     57 * @param root_info     pointer to root info structure of index
     58 * @return                      hash algorithm version
     59 */
    5260uint8_t ext4_directory_dx_root_info_get_hash_version(
    5361                ext4_directory_dx_root_info_t *root_info)
     
    5664}
    5765
     66/** Set hash version, that will be used in directory index.
     67 *
     68 * @param root_info             pointer to root info structure of index
     69 * @param version               hash algorithm version
     70 */
    5871void ext4_directory_dx_root_info_set_hash_version(
    5972                ext4_directory_dx_root_info_t *root_info, uint8_t version)
     
    6275}
    6376
     77/** Get length of root_info structure in bytes.
     78 *
     79 * @param root_info     pointer to root info structure of index
     80 * @return                      length of the structure
     81 */
    6482uint8_t ext4_directory_dx_root_info_get_info_length(
    6583                ext4_directory_dx_root_info_t *root_info)
     
    6886}
    6987
     88/** Set length of root_info structure in bytes.
     89 *
     90 * @param root_info             pointer to root info structure of index
     91 * @param info_length   length of the structure
     92 */
    7093void ext4_directory_dx_root_info_set_info_length(
    7194                ext4_directory_dx_root_info_t *root_info, uint8_t info_length)
     
    7497}
    7598
     99/** Get number of indirect levels of HTree.
     100 *
     101 * @param root_info     pointer to root info structure of index
     102 * @return                      height of HTree (actually only 0 or 1)
     103 */
    76104uint8_t ext4_directory_dx_root_info_get_indirect_levels(
    77105                ext4_directory_dx_root_info_t *root_info)
     
    80108}
    81109
     110/** Set number of indirect levels of HTree.
     111 *
     112 * @param root_info     pointer to root info structure of index
     113 * @param levels        height of HTree (actually only 0 or 1)
     114 */
    82115void ext4_directory_dx_root_info_set_indirect_levels(
    83116                ext4_directory_dx_root_info_t *root_info, uint8_t levels)
     
    86119}
    87120
     121/** Get maximum number of index node entries.
     122 *
     123 * @param countlimit    pointer to counlimit structure
     124 * @return                              maximum of entries in node
     125 */
    88126uint16_t ext4_directory_dx_countlimit_get_limit(
    89127                ext4_directory_dx_countlimit_t *countlimit)
     
    92130}
    93131
     132/** Set maximum number of index node entries.
     133 *
     134 * @param countlimit    pointer to counlimit structure
     135 * @param limit                 maximum of entries in node
     136 */
    94137void ext4_directory_dx_countlimit_set_limit(
    95138                ext4_directory_dx_countlimit_t *countlimit, uint16_t limit)
     
    98141}
    99142
     143/** Get current number of index node entries.
     144 *
     145 * @param countlimit    pointer to counlimit structure
     146 * @return                              number of entries in node
     147 */
    100148uint16_t ext4_directory_dx_countlimit_get_count(
    101149                ext4_directory_dx_countlimit_t *countlimit)
     
    104152}
    105153
     154/** Set current number of index node entries.
     155 *
     156 * @param countlimit    pointer to counlimit structure
     157 * @param count                 number of entries in node
     158 */
    106159void ext4_directory_dx_countlimit_set_count(
    107160                ext4_directory_dx_countlimit_t *countlimit, uint16_t count)
     
    110163}
    111164
     165/** Get hash value of index entry.
     166 *
     167 * @param entry         pointer to index entry
     168 * @return          hash value
     169 */
    112170uint32_t ext4_directory_dx_entry_get_hash(ext4_directory_dx_entry_t *entry)
    113171{
     
    115173}
    116174
     175
     176/** Set hash value of index entry.
     177 *
     178 * @param entry         pointer to index entry
     179 * @param hash          hash value
     180 */
    117181void ext4_directory_dx_entry_set_hash(ext4_directory_dx_entry_t *entry,
    118182                uint32_t hash)
     
    121185}
    122186
     187/** Get block address where child node is located.
     188 *
     189 * @param entry         pointer to index entry
     190 * @return          block address of child node
     191 */
    123192uint32_t ext4_directory_dx_entry_get_block(ext4_directory_dx_entry_t *entry)
    124193{
     
    126195}
    127196
     197/** Set block address where child node is located.
     198 *
     199 * @param entry         pointer to index entry
     200 * @param block         block address of child node
     201 */
    128202void ext4_directory_dx_entry_set_block(ext4_directory_dx_entry_t *entry,
    129203                uint32_t block)
     
    135209/**************************************************************************/
    136210
     211/** TODO comment all function
     212 *
     213 */
    137214int ext4_directory_dx_init(ext4_inode_ref_t *dir)
    138215{
     
    158235        ext4_directory_entry_ll_t *dot_dot = (ext4_directory_entry_ll_t *)&root->dots[1];
    159236
     237
     238        // TODO why the commented lines??
    160239        EXT4FS_DBG("dot len = \%u, dotdot len = \%u", ext4_directory_entry_ll_get_entry_length(dot), ext4_directory_entry_ll_get_entry_length(dot_dot));
    161240
Note: See TracChangeset for help on using the changeset viewer.