Updated debug output.
[AROS.git] / rom / partition / partitionmbr.h
blob38ee7aad610cb9e71e9ff962c61f2d42c3dfb916
1 #ifndef PARTITIONMBR_H
2 #define PARTITIONMBR_H
4 /*
5 Copyright © 2007-2012, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <exec/types.h>
10 #include <libraries/partition.h>
11 #include <utility/tagitem.h>
13 #include "partition_intern.h"
15 struct PCPartitionTable {
16 UBYTE status;
17 UBYTE start_head;
18 UBYTE start_sector;
19 UBYTE start_cylinder;
20 UBYTE type;
21 UBYTE end_head;
22 UBYTE end_sector;
23 UBYTE end_cylinder;
24 ULONG first_sector;
25 ULONG count_sector;
26 } __attribute__((packed));
28 struct MBR {
29 BYTE boot_data[0x1BE];
30 struct PCPartitionTable pcpt[4];
31 UWORD magic;
32 } __attribute__((packed));
34 #define MBR_MAGIC 0xAA55
35 #define MBR_STATUS_VALID(status) ((!(status & 0x0F)) || (status & 0x80))
37 LONG MBRCheckPartitionTable(struct Library *PartitionBase, struct PartitionHandle *root, void *buffer);
38 void PartitionMBRSetGeometry
40 struct PartitionHandle *root,
41 struct PCPartitionTable *entry,
42 ULONG sector,
43 ULONG count,
44 ULONG relative_sector
46 ULONG PartitionMBRDestroyPartitionTable(struct Library *PartitionBase,
47 struct PartitionHandle *root);
49 #define MBR_MAX_PARTITIONS (4)
50 #define MBRT_EXTENDED (0x05)
51 #define MBRT_EXTENDED2 (0x0f)
54 #endif /* PARTITIONMBR_H */