Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 1 | /* |
| 2 | * e2image.h --- header file describing the ext2 image format |
Theodore Ts'o | efc6f62 | 2008-08-27 23:07:54 -0400 | [diff] [blame] | 3 | * |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 4 | * Copyright (C) 2000 Theodore Ts'o. |
| 5 | * |
| 6 | * Note: this uses the POSIX IO interfaces, unlike most of the other |
Theodore Ts'o | efc6f62 | 2008-08-27 23:07:54 -0400 | [diff] [blame] | 7 | * functions in this library. So sue me. |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 8 | * |
| 9 | * %Begin-Header% |
Theodore Ts'o | 543547a | 2010-05-17 21:31:56 -0400 | [diff] [blame] | 10 | * This file may be redistributed under the terms of the GNU Library |
| 11 | * General Public License, version 2. |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 12 | * %End-Header% |
| 13 | */ |
| 14 | |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 15 | struct 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'o | c5423c5 | 2001-02-08 05:45:17 +0000 | [diff] [blame] | 18 | char fs_hostname[64];/* Hostname of machine of image */ |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 19 | 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'o | a78926e | 2001-05-03 04:02:29 +0000 | [diff] [blame] | 22 | char fs_device_name[64]; /* Device name */ |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 23 | char fs_uuid[16]; /* UUID of filesystem */ |
Theodore Ts'o | a78926e | 2001-05-03 04:02:29 +0000 | [diff] [blame] | 24 | __u32 fs_blocksize; /* Block size of the filesystem */ |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 25 | __u32 fs_reserved[8]; |
Theodore Ts'o | efc6f62 | 2008-08-27 23:07:54 -0400 | [diff] [blame] | 26 | |
Theodore Ts'o | 72ed126 | 2000-11-12 19:32:20 +0000 | [diff] [blame] | 27 | __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 | }; |