]>
code.delx.au - refind/blob - filesystems/fsw_ext2.h
3 * ext2 file system driver header.
7 * Copyright (c) 2006 Christoph Pfisterer
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #define VOLSTRUCTNAME fsw_ext2_volume
28 #define DNODESTRUCTNAME fsw_ext2_dnode
31 #include "fsw_ext2_disk.h"
34 //! Block size to be used when reading the ext2 superblock.
35 #define EXT2_SUPERBLOCK_BLOCKSIZE 1024
36 //! Block number where the (master copy of the) ext2 superblock resides.
37 #define EXT2_SUPERBLOCK_BLOCKNO 1
41 * ext2: Volume structure with ext2-specific data.
44 struct fsw_ext2_volume
{
45 struct fsw_volume g
; //!< Generic volume structure
47 struct ext2_super_block
*sb
; //!< Full raw ext2 superblock structure
48 fsw_u32
*inotab_bno
; //!< Block numbers of the inode tables
49 fsw_u32 ind_bcnt
; //!< Number of blocks addressable through an indirect block
50 fsw_u32 dind_bcnt
; //!< Number of blocks addressable through a double-indirect block
51 fsw_u32 inode_size
; //!< Size of inode structure in bytes
55 * ext2: Dnode structure with ext2-specific data.
58 struct fsw_ext2_dnode
{
59 struct fsw_dnode g
; //!< Generic dnode structure
61 struct ext2_inode
*raw
; //!< Full raw inode structure