Loading...
Searching...
No Matches
ext2.h
Go to the documentation of this file.
/*
ext2.h -- ext2 header
Copyright (C) 1998-2000, 2007, 2009-2014, 2019-2023, 2026 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _EXT2_H
#define _EXT2_H
#include <parted/parted.h>
#include <parted/debug.h>
#include <sys/types.h>
#include <inttypes.h>
#if ENABLE_NLS
# include <libintl.h>
# define _(String) dgettext (PACKAGE, String)
#else
# define _(String) (String)
#endif /* ENABLE_NLS */
typedef u_int32_t blk_t;
#ifdef HAVE_LINUX_EXT2_FS_H__FAILS_TO_COMPILE
#include <linux/ext2_fs.h>
#else
#include "ext2_fs.h"
#endif
struct ext2_fs
{
struct ext2_dev_handle *devhandle;
struct ext2_super_block sb;
struct ext2_group_desc *gd;
struct ext2_buffer_cache *bc;
int metadirty; /* 0:all sb&gd copies clean
1:all sb&gd copies dirty
2:only first sb&gd copy clean */
int dynamic_version;
int sparse; /* sparse superblocks */
int has_journal; /* journal */
int has_internal_journal;
int blocksize;
int logsize;
blk_t adminblocks;
blk_t gdblocks;
blk_t itoffset;
blk_t inodeblocks;
int numgroups;
int r_frac; /* reserved % of blocks */
unsigned char *relocator_pool;
unsigned char *relocator_pool_end;
int opt_debug;
int opt_safe;
int opt_verbose;
void *journal;
};
#endif
debug.h
blk_t
u_int32_t blk_t
Definition ext2.h:36
ext2_fs.h
parted.h
ext2_fs
Definition ext2.h:45
ext2_fs::devhandle
struct ext2_dev_handle * devhandle
Definition ext2.h:46
ext2_fs::journal
void * journal
Definition ext2.h:76
ext2_fs::has_journal
int has_journal
Definition ext2.h:57
ext2_fs::opt_safe
int opt_safe
Definition ext2.h:73
ext2_fs::bc
struct ext2_buffer_cache * bc
Definition ext2.h:50
ext2_fs::has_internal_journal
int has_internal_journal
Definition ext2.h:58
ext2_fs::opt_debug
int opt_debug
Definition ext2.h:72
ext2_fs::r_frac
int r_frac
Definition ext2.h:67
ext2_fs::itoffset
blk_t itoffset
Definition ext2.h:64
ext2_fs::gdblocks
blk_t gdblocks
Definition ext2.h:63
ext2_fs::numgroups
int numgroups
Definition ext2.h:66
ext2_fs::relocator_pool_end
unsigned char * relocator_pool_end
Definition ext2.h:70
ext2_fs::sparse
int sparse
Definition ext2.h:56
ext2_fs::dynamic_version
int dynamic_version
Definition ext2.h:55
ext2_fs::relocator_pool
unsigned char * relocator_pool
Definition ext2.h:69
ext2_fs::blocksize
int blocksize
Definition ext2.h:60
ext2_fs::opt_verbose
int opt_verbose
Definition ext2.h:74
ext2_fs::adminblocks
blk_t adminblocks
Definition ext2.h:62
ext2_fs::inodeblocks
blk_t inodeblocks
Definition ext2.h:65
ext2_fs::logsize
int logsize
Definition ext2.h:61
ext2_fs::sb
struct ext2_super_block sb
Definition ext2.h:48
ext2_fs::metadirty
int metadirty
Definition ext2.h:51
ext2_fs::gd
struct ext2_group_desc * gd
Definition ext2.h:49
ext2_group_desc
Definition ext2_fs.h:111