blob: 53b20cc73994342e48f9badc229234bd99c1173c [file] [log] [blame]
Theodore Ts'o72ed1262000-11-12 19:32:20 +00001/*
2 * e2image.h --- header file describing the ext2 image format
Theodore Ts'oefc6f622008-08-27 23:07:54 -04003 *
Theodore Ts'o72ed1262000-11-12 19:32:20 +00004 * Copyright (C) 2000 Theodore Ts'o.
5 *
6 * Note: this uses the POSIX IO interfaces, unlike most of the other
Theodore Ts'oefc6f622008-08-27 23:07:54 -04007 * functions in this library. So sue me.
Theodore Ts'o72ed1262000-11-12 19:32:20 +00008 *
9 * %Begin-Header%
Theodore Ts'o543547a2010-05-17 21:31:56 -040010 * This file may be redistributed under the terms of the GNU Library
11 * General Public License, version 2.
Theodore Ts'o72ed1262000-11-12 19:32:20 +000012 * %End-Header%
13 */
14
Theodore Ts'o72ed1262000-11-12 19:32:20 +000015struct ext2_image_hdr {
16 __u32 magic_number; /* This must be EXT2_ET_MAGIC_E2IMAGE */
17 char magic_descriptor[16]; /* "Ext2 Image 1.0", w/ null padding */
Theodore Ts'oc5423c52001-02-08 05:45:17 +000018 char fs_hostname[64];/* Hostname of machine of image */
Theodore Ts'o72ed1262000-11-12 19:32:20 +000019 char fs_netaddr[32]; /* Network address */
20 __u32 fs_netaddr_type;/* 0 = IPV4, 1 = IPV6, etc. */
21 __u32 fs_device; /* Device number of image */
Theodore Ts'oa78926e2001-05-03 04:02:29 +000022 char fs_device_name[64]; /* Device name */
Theodore Ts'o72ed1262000-11-12 19:32:20 +000023 char fs_uuid[16]; /* UUID of filesystem */
Theodore Ts'oa78926e2001-05-03 04:02:29 +000024 __u32 fs_blocksize; /* Block size of the filesystem */
Theodore Ts'o72ed1262000-11-12 19:32:20 +000025 __u32 fs_reserved[8];
Theodore Ts'oefc6f622008-08-27 23:07:54 -040026
Theodore Ts'o72ed1262000-11-12 19:32:20 +000027 __u32 image_device; /* Device number of image file */
28 __u32 image_inode; /* Inode number of image file */
29 __u32 image_time; /* Time of image creation */
30 __u32 image_reserved[8];
31
32 __u32 offset_super; /* Byte offset of the sb and descriptors */
33 __u32 offset_inode; /* Byte offset of the inode table */
34 __u32 offset_inodemap; /* Byte offset of the inode bitmaps */
35 __u32 offset_blockmap; /* Byte offset of the inode bitmaps */
36 __u32 offset_reserved[8];
37};