xref: /aosp_15_r20/external/e2fsprogs/lib/ext2fs/e2image.h (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker /*
2*6a54128fSAndroid Build Coastguard Worker  * e2image.h --- header file describing the ext2 image format
3*6a54128fSAndroid Build Coastguard Worker  *
4*6a54128fSAndroid Build Coastguard Worker  * Copyright (C) 2000 Theodore Ts'o.
5*6a54128fSAndroid Build Coastguard Worker  *
6*6a54128fSAndroid Build Coastguard Worker  * Note: this uses the POSIX IO interfaces, unlike most of the other
7*6a54128fSAndroid Build Coastguard Worker  * functions in this library.  So sue me.
8*6a54128fSAndroid Build Coastguard Worker  *
9*6a54128fSAndroid Build Coastguard Worker  * %Begin-Header%
10*6a54128fSAndroid Build Coastguard Worker  * This file may be redistributed under the terms of the GNU Library
11*6a54128fSAndroid Build Coastguard Worker  * General Public License, version 2.
12*6a54128fSAndroid Build Coastguard Worker  * %End-Header%
13*6a54128fSAndroid Build Coastguard Worker  */
14*6a54128fSAndroid Build Coastguard Worker 
15*6a54128fSAndroid Build Coastguard Worker struct ext2_image_hdr {
16*6a54128fSAndroid Build Coastguard Worker 	__u32	magic_number;	/* This must be EXT2_ET_MAGIC_E2IMAGE */
17*6a54128fSAndroid Build Coastguard Worker 	char	magic_descriptor[16]; /* "Ext2 Image 1.0", w/ null padding */
18*6a54128fSAndroid Build Coastguard Worker 	char	fs_hostname[64];/* Hostname of machine of image */
19*6a54128fSAndroid Build Coastguard Worker 	char	fs_netaddr[32];	/* Network address */
20*6a54128fSAndroid Build Coastguard Worker 	__u32	fs_netaddr_type;/* 0 = IPV4, 1 = IPV6, etc. */
21*6a54128fSAndroid Build Coastguard Worker 	__u32	fs_device;	/* Device number of image */
22*6a54128fSAndroid Build Coastguard Worker 	char	fs_device_name[64]; /* Device name */
23*6a54128fSAndroid Build Coastguard Worker 	char	fs_uuid[16];	/* UUID of filesystem */
24*6a54128fSAndroid Build Coastguard Worker 	__u32	fs_blocksize;	/* Block size of the filesystem */
25*6a54128fSAndroid Build Coastguard Worker 	__u32	fs_reserved[8];
26*6a54128fSAndroid Build Coastguard Worker 
27*6a54128fSAndroid Build Coastguard Worker 	__u32	image_device;	/* Device number of image file */
28*6a54128fSAndroid Build Coastguard Worker 	__u32	image_inode;	/* Inode number of image file */
29*6a54128fSAndroid Build Coastguard Worker 	__u32	image_time;	/* Time of image creation */
30*6a54128fSAndroid Build Coastguard Worker 	__u32	image_reserved[8];
31*6a54128fSAndroid Build Coastguard Worker 
32*6a54128fSAndroid Build Coastguard Worker 	__u32	offset_super;	/* Byte offset of the sb and descriptors */
33*6a54128fSAndroid Build Coastguard Worker 	__u32	offset_inode;	/* Byte offset of the inode table  */
34*6a54128fSAndroid Build Coastguard Worker 	__u32	offset_inodemap; /* Byte offset of the inode bitmaps */
35*6a54128fSAndroid Build Coastguard Worker 	__u32	offset_blockmap; /* Byte offset of the inode bitmaps */
36*6a54128fSAndroid Build Coastguard Worker 	__u32	offset_reserved[8];
37*6a54128fSAndroid Build Coastguard Worker };
38