2
* Copyright (C) 2004,2005 Heinz Mauelshagen, Red Hat GmbH.
5
* See file LICENSE at the top of this source tree for license information.
9
* DOS partition defintion.
11
* Profited from libparted.
22
#define DOS_CONFIGOFFSET 0
23
#define DOS_DATAOFFSET 0
29
} __attribute__ ((packed));
31
struct dos_partition {
32
uint8_t boot_ind; /* 00: 0x80 - active */
33
struct chs chs_start; /* 01: */
34
uint8_t type; /* 04: partition type */
35
#define PARTITION_EMPTY 0x00
36
#define PARTITION_EXT 0x05
37
#define PARTITION_EXT_LBA 0x0f
38
#define PARTITION_LINUX_EXT 0x85
39
#define PARTITION_GPT 0xee
40
struct chs chs_end; /* 05: */
41
uint32_t start; /* 08: starting sector from 0 */
42
uint32_t length; /* 0c: nr of sectors in partition */
43
} __attribute__ ((packed));
46
uint8_t boot_code [446];
47
struct dos_partition partitions [4];
49
#define DOS_MAGIC 0xAA55
50
#define PARTITION_MAGIC_MAGIC 0xF6F6
51
} __attribute__ ((packed));
53
#endif /* FORMAT_HANDLER */
55
/* Prototype of the register function for this metadata format handler */
56
int register_dos(struct lib_context *lc);