Init control word to zero, cdrom-handler reads this and will crash if it is non-zero...
[AROS.git] / rom / partition / partitionmbr.h
blob7509aa08e962583c6a549d31950f8a54f184fc4b
1 #ifndef PARTITIONMBR_H
2 #define PARTITIONMBR_H
4 /*
5 Copyright © 2007-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 */
10 #include <exec/types.h>
11 #include <libraries/partition.h>
12 #include <utility/tagitem.h>
14 #include "partition_intern.h"
16 struct PCPartitionTable {
17 UBYTE status;
18 UBYTE start_head;
19 UBYTE start_sector;
20 UBYTE start_cylinder;
21 UBYTE type;
22 UBYTE end_head;
23 UBYTE end_sector;
24 UBYTE end_cylinder;
25 ULONG first_sector;
26 ULONG count_sector;
27 } __attribute__((packed));
29 struct MBR {
30 BYTE boot_data[0x1BE];
31 struct PCPartitionTable pcpt[4];
32 UWORD magic;
33 } __attribute__((packed));
35 #define MBR_MAGIC 0xAA55
36 #define MBR_STATUS_VALID(status) ((!(status & 0x0F)) || (status & 0x80))
38 LONG MBRCheckPartitionTable(struct Library *PartitionBase, struct PartitionHandle *root, void *buffer);
40 void PartitionMBRSetGeometry
42 struct PartitionHandle *root,
43 struct PCPartitionTable *entry,
44 ULONG sector,
45 ULONG count,
46 ULONG relative_sector
49 #define MBR_MAX_PARTITIONS (4)
50 #define MBRT_EXTENDED (0x05)
51 #define MBRT_EXTENDED2 (0x0f)
54 #endif /* PARTITIONMBR_H */