/*
* ext2fs.h --- ext2fs
*
* Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
*
* %Begin-Header%
* This file may be redistributed under the terms of the GNU Library
* General Public License, version 2.
* %End-Header%
*/
#ifndef _EXT2FS_EXT2FS_H
#define _EXT2FS_EXT2FS_H
#ifdef __GNUC__
#define EXT2FS_ATTR(x) __attribute__(x)
#else
#define EXT2FS_ATTR(x)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Non-GNU C compilers won't necessarily understand inline
*/
#if (!defined(__GNUC__) && !defined(__WATCOMC__))
#define NO_INLINE_FUNCS
#endif
/*
* Where the master copy of the superblock is located, and how big
* superblocks are supposed to be. We define SUPERBLOCK_SIZE because
* the size of the superblock structure is not necessarily trustworthy
* (some versions have the padding set up so that the superblock is
* 1032 bytes long).
*/
#define SUPERBLOCK_OFFSET 1024
#define SUPERBLOCK_SIZE 1024
/*
* The last ext2fs revision level that this version of the library is
* able to support.
*/
#define EXT2_LIB_CURRENT_REV EXT2_DYNAMIC_REV
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#if EXT2_FLAT_INCLUDES
#include "e2_types.h"
#include "ext2_fs.h"
#include "ext3_extents.h"
#else
#include <ext2fs/ext2_types.h>
#include <ext2fs/ext2_fs.h>
#include <ext2fs/ext3_extents.h>
#endif /* EXT2_FLAT_INCLUDES */
typedef __u32 ext2_ino_t;
typedef __u32 blk_t;
typedef __u64 blk64_t;
typedef __u32 dgrp_t;
typedef __u32 ext2_off_t;
typedef __u64 ext2_off64_t;
typedef __s64 e2_blkcnt_t;
typedef __u32 ext2_dirhash_t;
#if EXT2_FLAT_INCLUDES
#include "com_err.h"
#include "ext2_io.h"
#include "ext2_err.h"
#include "ext2_ext_attr.h"
#else
#include <et/com_err.h>
#include <ext2fs/ext2_io.h>
#include <ext2fs/ext2_err.h>
#include <ext2fs/ext2_ext_attr.h>
#endif
/*
* Portability help for Microsoft Visual C++
*/
#ifdef _MSC_VER
#define EXT2_QSORT_TYPE int __cdecl
#else
#define EXT2_QSORT_TYPE int
#endif
typedef struct struct_ext2_filsys *ext2_filsys;
#define EXT2FS_MARK_ERROR 0
#define EXT2FS_UNMARK_ERROR 1
#define EXT2FS_TEST_ERROR 2
typedef struct ext2fs_struct_generic_bitmap *ext2fs_generic_bitmap;
typedef struct ext2fs_struct_generic_bitmap *ext2fs_inode_bitmap;
typedef struct ext2fs_struct_generic_bitmap *ext2fs_block_bitmap;
#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO(s)
/*
* Badblocks list definitions
*/
typedef struct ext2_struct_u32_list *ext2_badblocks_list;
typedef struct ext2_struct_u32_iterate *ext2_badblocks_iterate;
typedef struct ext2_struct_u32_list *ext2_u32_list;
typedef struct ext2_struct_u32_iterate *ext2_u32_iterate;
/* old */
typedef struct ext2_struct_u32_list *badblocks_list;
typedef struct ext2_struct_u32_iterate *badblocks_iterate;
#define BADBLOCKS_FLAG_DIRTY 1
/*
* ext2_dblist structure and abstractions (see dblist.c)
*/
struct ext2_db_entry2 {
ext2_ino_t ino;
blk64_t blk;
e2_blkcnt_t blockcnt;
};
/* Ye Olde 32-bit version */
struct ext2_db_entry {
ext2_ino_t ino;
blk_t blk;
int blockcnt;
};
typedef struct ext2_struct_dblist *ext2_dblist;
#define DBLIST_ABORT 1
/*
* ext2_fileio definitions
*/
#define EXT2_FILE_WRITE 0x0001
#define EXT2_FILE_CREATE 0x0002
#define EXT2_FILE_MASK 0x00FF
#define EXT2_FILE_BUF_DIRTY 0x4000
#define EXT2_FILE_BUF_VALID 0x2000
typedef struct ext2_file *ext2_file_t;
#define EXT2_SEEK_SET 0
#define EXT2_SEEK_CUR 1
#define EXT2_SEEK_END 2
/*
* Flags for the ext2_filsys structure and for ext2fs_open()
*/
#define EXT2_FLAG_RW 0x01
#define EXT2_FLAG_CHANGED 0x02
#define EXT2_FLAG_DIRTY 0x04
#define EXT2_FLAG_VALID 0x08
#define EXT2_FLAG_IB_DIRTY 0x10
#define EXT2_FLAG_BB_DIRTY 0x20
#define EXT2_FLAG_SWAP_BYTES 0x40
#define EXT2_FLAG_SWAP_BYTES_READ 0x80
#define EXT2_FLAG_SWAP_BYTES_WRITE 0x100
#define EXT2_FLAG_MASTER_SB_ONLY 0x200
#define EXT2_FLAG_FORCE 0x400
#define EXT2_FLAG_SUPER_ONLY 0x800
#define EXT2_FLAG_JOURNAL_DEV_OK 0x1000
#define EXT2_FLAG_IMAGE_FILE 0x2000
#define EXT2_FLAG_EXCLUSIVE 0x4000
#define EXT2_FLAG_SOFTSUPP_FEATURES 0x8000
#define EXT2_FLAG_NOFREE_ON_ERROR 0x10000
#define EXT2_FLAG_64BITS 0x20000
#define EXT2_FLAG_PRINT_PROGRESS 0x40000
#define EXT2_FLAG_DIRECT_IO 0x80000
#define EXT2_FLAG_SKIP_MMP 0x100000
#define EXT2_FLAG_IGNORE_CSUM_ERRORS 0x200000
/*
* Special flag in the ext2 inode i_flag field that means that this is
* a new inode. (So that ext2_write_inode() can clear extra fields.)
*/
#define EXT2_NEW_INODE_FL 0x80000000
/*
* Flags for mkjournal
*/
#define EXT2_MKJOURNAL_V1_SUPER 0x0000001 /* create V1 superblock (deprecated) */
#define EXT2_MKJOURNAL_LAZYINIT 0x0000002 /* don't zero journal inode before use*/
#define EXT2_MKJOURNAL_NO_MNT_CHECK 0x0000004 /* don't check mount status */
struct opaque_ext2_group_desc;
struct struct_ext2_filsys {
errcode_t magic;
io_channel io;
int flags;
char * device_name;
struct ext2_super_block * super;
unsigned int blocksize;
int fragsize;
dgrp_t group_desc_count;
unsigned long desc_blocks;
struct opaque_ext2_group_desc * group_desc;
unsigned int inode_blocks_per_group;
ext2fs_inode_bitmap inode_map;
ext2fs_block_bitmap block_map;
/* XXX FIXME-64: not 64-bit safe, but not used? */
errcode_t (*get_blocks)(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks);
errcode_t (*check_directory)(ext2_filsys fs, ext2_ino_t ino);
errcode_t (*write_bitmaps)(ext2_filsys fs);
errcode_t (*read_inode)(ext2_filsys fs, ext2_ino_t ino,
struct ext2_inode *inode);
errcode_t (*write_inode)(ext2_filsys fs, ext2_ino_t ino,
struct ext2_inode *inode);
ext2_badblocks_list badblocks;
ext2_dblist dblist;
__u32 stride; /* for mke2fs */
struct ext2_super_block * orig_super;
struct ext2_image_hdr * image_header;
__u32 umask;
time_t now;
int cluster_ratio_bits;
__u16 default_bitmap_type;
__u16 pad;
/*
* Reserved for future expansion
*/
__u32 reserved[5];
/*
* Reserved for the use of the calling application.
*/
void * priv_data;
/*
* Inode cache
*/
struct ext2_inode_cache *icache;
io_channel image_io;
/*
* More callback functions
*/
errcode_t (*get_alloc_block)(ext2_filsys fs, blk64_t goal,
blk64_t *ret);
void (*block_alloc_stats)(ext2_filsys fs, blk64_t blk, int inuse);
/*
* Buffers for Multiple mount protection(MMP) block.
*/
void *mmp_buf;
void *mmp_cmp;
int mmp_fd;
/*
* Time at which e2fsck last updated the MMP block.
*/
long mmp_last_written;
/* progress operation functions */
struct ext2fs_progress_ops *progress_ops;
/* Precomputed FS UUID checksum for seeding other checksums */
__u32 csum_seed;
};
#if EXT2_FLAT_INCLUDES
#include "e2_bitops.h"
#else
#include <ext2fs/bitops.h>
#endif
/*
* 64-bit bitmap backend types
*/
#define EXT2FS_BMAP64_BITARRAY 1
#define EXT2FS_BMAP64_RBTREE 2
#define EXT2FS_BMAP64_AUTODIR 3
/*
* Return flags for the block iterator functions
*/
#define BLOCK_CHANGED 1
#define BLOCK_ABORT 2
#define BLOCK_ERROR 4
/*
* Block interate flags
*
* BLOCK_FLAG_APPEND, or BLOCK_FLAG_HOLE, indicates that the interator
* function should be called on blocks where the block number is zero.
* This is used by ext2fs_expand_dir() to be able to add a new block
* to an inode. It can also be used for programs that want to be able
* to deal with files that contain "holes".
*
* BLOCK_FLAG_DEPTH_TRAVERSE indicates that the iterator function for
* the indirect, doubly indirect, etc. blocks should be called after
* all of the blocks containined in the indirect blocks are processed.
* This is useful if you are going to be deallocating blocks from an
* inode.
*
* BLOCK_FLAG_DATA_ONLY indicates that the iterator function should be
* called for data blocks only.
*
* BLOCK_FLAG_READ_ONLY is a promise by the caller that it will not
* modify returned block number.
*
* BLOCK_FLAG_NO_LARGE is for internal use only. It informs
* ext2fs_block_
没有合适的资源?快使用搜索试试~ 我知道了~
mkfs工具等e2fsprogs
共191个文件
8:28个
so:24个
h:19个
4星 · 超过85%的资源 需积分: 50 265 下载量 81 浏览量
2012-10-31
09:33:05
上传
评论 7
收藏 14.62MB RAR 举报
温馨提示
已编译好的,已在android2.3.7环境下验证通过。里面包括mkfs.ext3 mkfs.ext4等工具。具体在android下的应用配置,请参见我的blog: http://blog.csdn.net/hp_2008中的文章:android 下使用mkfs.ext4命令(交叉编译e2fsprogs)
资源推荐
资源详情
资源评论
收起资源包目录
mkfs工具等e2fsprogs (191个子文件)
libpthread.so.0 116KB
libnsl.so.1 89KB
libgcc_s.so.1 57KB
librt.so.1 36KB
libthread_db.so.1 36KB
libcrypt.so.1 26KB
libanl.so.1 14KB
libutil.so.1 13KB
libBrokenLocale.so.1 7KB
chattr.1 7KB
compile_et.1 2KB
uuidgen.1 2KB
mk_cmds.1 1KB
lsattr.1 1KB
libresolv.so.2 74KB
libnss_nisplus.so.2 52KB
libnss_files.so.2 48KB
libnss_nis.so.2 43KB
libnss_compat.so.2 32KB
libnss_hesiod.so.2 18KB
libnss_dns.so.2 17KB
libdl.so.2 14KB
ld-linux.so.3 154KB
uuid_generate.3 4KB
uuid_generate_random.3 4KB
uuid_generate_time.3 4KB
libblkid.3 3KB
uuid_time.3 3KB
uuid_unparse.3 3KB
uuid.3 3KB
uuid_parse.3 3KB
uuid_compare.3 2KB
com_err.3 2KB
uuid_is_null.3 2KB
uuid_copy.3 2KB
uuid_clear.3 2KB
e2fsck.conf.5 13KB
mke2fs.conf.5 12KB
libc.so.6 1.29MB
libstdc++.so.6 1.09MB
libm.so.6 696KB
libstdc++.so.6.0.8 1.09MB
mkfs.ext2.8 20KB
mke2fs.8 20KB
mkfs.ext4dev.8 20KB
mkfs.ext3.8 20KB
mkfs.ext4.8 20KB
tune2fs.8 20KB
debugfs.8 16KB
fsck.ext4.8 12KB
fsck.ext2.8 12KB
fsck.ext3.8 12KB
e2fsck.8 12KB
fsck.ext4dev.8 12KB
fsck.8 11KB
badblocks.8 6KB
e2image.8 6KB
resize2fs.8 4KB
blkid.8 4KB
e2freefrag.8 2KB
dumpe2fs.8 2KB
e4defrag.8 2KB
uuidd.8 2KB
logsave.8 2KB
mklost+found.8 1KB
e2label.8 1KB
e2undo.8 1KB
filefrag.8 997B
findfs.8 809B
libstdc++.a 8.07MB
libext2fs.a 1.56MB
libext2fs.a 1.56MB
libiberty.a 605KB
libsupc++.a 464KB
libblkid.a 183KB
libblkid.a 183KB
libquota.a 151KB
libquota.a 151KB
libe2p.a 140KB
libe2p.a 140KB
libss.a 115KB
libss.a 115KB
libuuid.a 57KB
libuuid.a 57KB
libcom_err.a 36KB
libcom_err.a 36KB
et_c.awk 6KB
et_h.awk 4KB
ct_c.awk 2KB
badblocks 574KB
blkid 168KB
chattr 47KB
compile_et 2KB
mke2fs.conf 966B
debugfs 1.18MB
dumpe2fs 673KB
e2freefrag 562KB
e2fsck 1.77MB
e2image 635KB
e2initrd_helper 772KB
共 191 条
- 1
- 2
平凡的人
- 粉丝: 94
- 资源: 62
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页