libparted 3.6
Loading...
Searching...
No Matches
ext2.h
Go to the documentation of this file.
1/*
2 ext2.h -- ext2 header
3 Copyright (C) 1998-2000, 2007, 2009-2014, 2019-2023 Free Software
4 Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef _EXT2_H
21#define _EXT2_H
22
23#include <parted/parted.h>
24#include <parted/debug.h>
25#include <sys/types.h>
26
27#include <inttypes.h>
28
29#if ENABLE_NLS
30# include <libintl.h>
31# define _(String) dgettext (PACKAGE, String)
32#else
33# define _(String) (String)
34#endif /* ENABLE_NLS */
35
36typedef u_int32_t blk_t;
37
38#ifdef HAVE_LINUX_EXT2_FS_H__FAILS_TO_COMPILE
39#include <linux/ext2_fs.h>
40#else
41#include "ext2_fs.h"
42#endif
43
44struct ext2_fs
45{
46 struct ext2_dev_handle *devhandle;
47
48 struct ext2_super_block sb;
50 struct ext2_buffer_cache *bc;
51 int metadirty; /* 0:all sb&gd copies clean
52 1:all sb&gd copies dirty
53 2:only first sb&gd copy clean */
54
56 int sparse; /* sparse superblocks */
57 int has_journal; /* journal */
59
67 int r_frac; /* reserved % of blocks */
68
69 unsigned char *relocator_pool;
70 unsigned char *relocator_pool_end;
71
75
76 void *journal;
77};
78
79#endif
u_int32_t blk_t
Definition: ext2.h:36
Definition: ext2.h:45
struct ext2_dev_handle * devhandle
Definition: ext2.h:46
void * journal
Definition: ext2.h:76
int has_journal
Definition: ext2.h:57
int opt_safe
Definition: ext2.h:73
struct ext2_buffer_cache * bc
Definition: ext2.h:50
int has_internal_journal
Definition: ext2.h:58
int opt_debug
Definition: ext2.h:72
int r_frac
Definition: ext2.h:67
blk_t itoffset
Definition: ext2.h:64
blk_t gdblocks
Definition: ext2.h:63
int numgroups
Definition: ext2.h:66
unsigned char * relocator_pool_end
Definition: ext2.h:70
int sparse
Definition: ext2.h:56
int dynamic_version
Definition: ext2.h:55
unsigned char * relocator_pool
Definition: ext2.h:69
int blocksize
Definition: ext2.h:60
int opt_verbose
Definition: ext2.h:74
blk_t adminblocks
Definition: ext2.h:62
blk_t inodeblocks
Definition: ext2.h:65
int logsize
Definition: ext2.h:61
struct ext2_super_block sb
Definition: ext2.h:48
int metadirty
Definition: ext2.h:51
struct ext2_group_desc * gd
Definition: ext2.h:49
Definition: ext2_fs.h:110