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