Changeset b53a733 in mainline for uspace/lib/ext4/libext4_directory.h


Ignore:
Timestamp:
2012-03-07T09:33:14Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2629b08
Parents:
a872fc09
Message:

Data types definitions groupped to one file

File:
1 edited

Legend:

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

    ra872fc09 rb53a733  
    3434#define LIBEXT4_LIBEXT4_DIRECTORY_H_
    3535
    36 #include "libext4_filesystem.h"
    37 #include "libext4_inode.h"
    38 
    39 #define EXT4_DIRECTORY_FILENAME_LEN     255
    40 
    41 #define EXT4_DIRECTORY_FILETYPE_UNKNOWN         0
    42 #define EXT4_DIRECTORY_FILETYPE_REG_FILE        1
    43 #define EXT4_DIRECTORY_FILETYPE_DIR             2
    44 #define EXT4_DIRECTORY_FILETYPE_CHRDEV          3
    45 #define EXT4_DIRECTORY_FILETYPE_BLKDEV          4
    46 #define EXT4_DIRECTORY_FILETYPE_FIFO            5
    47 #define EXT4_DIRECTORY_FILETYPE_SOCK            6
    48 #define EXT4_DIRECTORY_FILETYPE_SYMLINK         7
    49 
    50 /**
    51  * Linked list directory entry structure
    52  */
    53 typedef struct ext4_directory_entry_ll {
    54         uint32_t inode; // Inode for the entry
    55         uint16_t entry_length; // Distance to the next directory entry
    56         uint8_t name_length; // Lower 8 bits of name length
    57         union {
    58                 uint8_t name_length_high; // Higher 8 bits of name length
    59                 uint8_t inode_type; // Type of referenced inode (in rev >= 0.5)
    60         } __attribute__ ((packed));
    61         uint8_t name[EXT4_DIRECTORY_FILENAME_LEN]; // Entry name
    62 } __attribute__ ((packed)) ext4_directory_entry_ll_t;
    63 
    64 typedef struct ext4_directory_iterator {
    65         ext4_filesystem_t *fs;
    66         ext4_inode_ref_t *inode_ref;
    67         block_t *current_block;
    68         aoff64_t current_offset;
    69         ext4_directory_entry_ll_t *current;
    70 } ext4_directory_iterator_t;
    71 
    72 typedef struct ext4_directory_search_result {
    73         block_t *block;
    74         ext4_directory_entry_ll_t *dentry;
    75 } ext4_directory_search_result_t;
     36#include "libext4_types.h"
    7637
    7738extern uint32_t ext4_directory_entry_ll_get_inode(ext4_directory_entry_ll_t *);
Note: See TracChangeset for help on using the changeset viewer.