Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / partition / partitionmbr.h
blobf1eb9a1784640e33b5f3fdc49e1bc9416190e605
1 #ifndef PARTITIONMBR_H
2 #define PARTITIONMBR_H
4 /*
5 Copyright © 2007, 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 void PartitionMBRSetGeometry
37 struct PartitionHandle *root,
38 struct PCPartitionTable *entry,
39 ULONG sector,
40 ULONG count,
41 ULONG relative_sector
44 #define MBR_MAX_PARTITIONS (4)
45 #define MBRT_EXTENDED (0x05)
46 #define MBRT_EXTENDED2 (0x0f)
49 #endif /* PARTITIONMBR_H */