23 #include "pedigree/kernel/processor/types.h" 25 #define EXT2_UNKNOWN 0x0 27 #define EXT2_DIRECTORY 0x2 28 #define EXT2_CHAR_DEV 0x3 29 #define EXT2_BLOCK_DEV 0x4 31 #define EXT2_SOCKET 0x6 32 #define EXT2_SYMLINK 0x7 35 #define EXT2_STATE_CLEAN 1 36 #define EXT2_STATE_UNCLEAN 2 38 #define EXT2_S_IFSOCK 0xC000 39 #define EXT2_S_IFLNK 0xA000 40 #define EXT2_S_IFREG 0x8000 41 #define EXT2_S_IFBLK 0x6000 42 #define EXT2_S_IFDIR 0x4000 43 #define EXT2_S_IFCHR 0x2000 44 #define EXT2_S_IFIFO 0x1000 46 #define EXT2_S_IRUSR 0x0100 47 #define EXT2_S_IWUSR 0x0080 48 #define EXT2_S_IXUSR 0x0040 49 #define EXT2_S_IRGRP 0x0020 50 #define EXT2_S_IWGRP 0x0010 51 #define EXT2_S_IXGRP 0x0008 52 #define EXT2_S_IROTH 0x0004 53 #define EXT2_S_IWOTH 0x0002 54 #define EXT2_S_IXOTH 0x0001 56 #define EXT2_BAD_INO 0x01 // Bad blocks inode 57 #define EXT2_ROOT_INO 0x02 // root directory inode 58 #define EXT2_ACL_IDX_INO 0x03 // ACL index inode (deprecated?) 59 #define EXT2_ACL_DATA_INO 0x04 // ACL data inode (deprecated?) 60 #define EXT2_BOOT_LOADER_INO 0x05 // boot loader inode 61 #define EXT2_UNDEL_DIR_INO 0x06 63 #define EXT2_LZV1_ALG 0x01 64 #define EXT2_LZRW3A_ALG 0x02 65 #define EXT2_GZIP_ALG 0x04 66 #define EXT2_BZIP2_ALG 0x08 67 #define EXT2_LZO_ALG 0x10 69 #define EXT2_SECRM_FL 0x00000001 70 #define EXT2_UNRM_FL 0x00000002 71 #define EXT2_COMPR_FL 0x00000004 72 #define EXT2_SYNC_FL 0x00000008 73 #define EXT2_IMMUTABLE_FL 0x00000010 74 #define EXT2_APPEND_FL 0x00000020 75 #define EXT2_NODUMP_FL 0x00000040 76 #define EXT2_NOATIME_FL 0x00000080 77 #define EXT2_DIRTY_FL 0x00000100 78 #define EXT2_COMPRBLK_FL 0x00000200 79 #define EXT2_NOCOMPR_FL 0x00000400 80 #define EXT2_ECOMPR_FL 0x00000800 81 #define EXT2_BTREE_FL 0x00001000 82 #define EXT2_INDEX_FL 0x00001000 83 #define EXT2_IMAGIC_FL 0x00002000 84 #define EXT3_JOURNAL_DATA_FL 0x00004000 85 #define EXT2_RESERVED_FL 0x80000000 90 uint32_t s_inodes_count;
91 uint32_t s_blocks_count;
92 uint32_t s_r_blocks_count;
93 uint32_t s_free_blocks_count;
94 uint32_t s_free_inodes_count;
95 uint32_t s_first_data_block;
96 uint32_t s_log_block_size;
97 uint32_t s_log_frag_size;
98 uint32_t s_blocks_per_group;
99 uint32_t s_frags_per_group;
100 uint32_t s_inodes_per_group;
103 uint16_t s_mnt_count;
104 uint16_t s_max_mnt_count;
108 uint16_t s_minor_rev_level;
109 uint32_t s_lastcheck;
110 uint32_t s_checkinterval;
111 uint32_t s_creator_os;
112 uint32_t s_rev_level;
113 uint16_t s_def_resuid;
114 uint16_t s_def_resgid;
116 uint32_t s_first_ino;
117 uint16_t s_inode_size;
118 uint16_t s_block_group_nr;
119 uint32_t s_feature_compat;
120 uint32_t s_feature_incompat;
121 uint32_t s_feature_ro_compat;
124 char s_volume_name[16];
125 char s_last_mounted[64];
126 uint32_t s_algo_bitmap;
128 uint8_t s_prealloc_blocks;
129 uint8_t s_prealloc_dir_blocks;
132 char s_journal_uuid[16];
133 uint32_t s_journal_inum;
134 uint32_t s_journal_dev;
135 uint32_t s_last_orphan;
141 uint32_t bg_block_bitmap;
142 uint32_t bg_inode_bitmap;
143 uint32_t bg_inode_table;
144 uint16_t bg_free_blocks_count;
145 uint16_t bg_free_inodes_count;
146 uint16_t bg_used_dirs_count;
148 uint8_t bg_reserved[12];
162 uint16_t i_links_count;
166 uint32_t i_block[15];
167 uint32_t i_generation;