Root/
Source at commit 1275 created 12 years 11 months ago. By meklort, Remove unused file. Fixup makefiles some more - boot2 compiles again. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2011 Evan Lojewski. All rights reserved.␊ |
3 | *␊ |
4 | */␊ |
5 | #ifndef GUID_PARTITION_H␊ |
6 | #define GUID_PARTITION_H␊ |
7 | ␊ |
8 | #include <IOKit/IOTypes.h>␊ |
9 | #include <Partition.hpp>␊ |
10 | #include <IOKit/storage/IOGUIDPartitionScheme.h>␊ |
11 | ␊ |
12 | #pragma pack(push, 1) /* (enable 8-bit struct packing) */␊ |
13 | ␊ |
14 | typedef struct␊ |
15 | {␊ |
16 | UInt8 hdr_sig[8];␊ |
17 | UInt32 hdr_revision;␊ |
18 | UInt32 hdr_size;␊ |
19 | UInt32 hdr_crc_self;␊ |
20 | UInt32 __reserved;␊ |
21 | UInt64 hdr_lba_self;␊ |
22 | UInt64 hdr_lba_alt;␊ |
23 | UInt64 hdr_lba_start;␊ |
24 | UInt64 hdr_lba_end;␊ |
25 | UInt8 hdr_uuid[16];␊ |
26 | UInt64 hdr_lba_table;␊ |
27 | UInt32 hdr_entries;␊ |
28 | UInt32 hdr_entsz;␊ |
29 | UInt32 hdr_crc_table;␊ |
30 | UInt32 padding;␊ |
31 | } GPTHeader;␊ |
32 | ␊ |
33 | /* Partition map entry. */␊ |
34 | ␊ |
35 | typedef struct␊ |
36 | {␊ |
37 | UInt8 ent_type[16];␊ |
38 | UInt8 ent_uuid[16];␊ |
39 | UInt64 ent_lba_start;␊ |
40 | UInt64 ent_lba_end;␊ |
41 | UInt64 ent_attr;␊ |
42 | UInt16 ent_name[36];␊ |
43 | } GPTEntry;␊ |
44 | ␊ |
45 | #pragma pack(pop)␊ |
46 | ␊ |
47 | class GUIDPartition : public Partition␊ |
48 | {␊ |
49 | public:␊ |
50 | GUIDPartition(Disk* disk, UInt8 partitionNumber);␊ |
51 | ~GUIDPartition();␊ |
52 | ␊ |
53 | protected:␊ |
54 | bool isGPTDisk();␊ |
55 | ␊ |
56 | private:␊ |
57 | UInt8 mLBABUffer[512*4 ]; // TODO: don't assume 512␊ |
58 | GPTHeader* mGPTHeader;␊ |
59 | GPTEntry* mGPTEntry;␊ |
60 | };␊ |
61 | ␊ |
62 | #endif /* GUID_PARTITION_H */␊ |
63 |