Chameleon

Chameleon Svn Source Tree

Root/branches/Chimera/i386/include/IOKit/storage/IOGUIDPartitionScheme.h

1/*
2 * Copyright (c) 1998-2009 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24/*
25 * This header contains the IOGUIDPartitionScheme class definition.
26 */
27
28#ifndef _IOGUIDPARTITIONSCHEME_H
29#define _IOGUIDPARTITIONSCHEME_H
30
31#include <IOKit/IOTypes.h>
32
33typedef unsigned char uuid_t[16];
34/*
35 * kIOGUIDPartitionSchemeClass is the name of the IOGUIDPartitionScheme class.
36 */
37
38#define kIOGUIDPartitionSchemeClass "IOGUIDPartitionScheme"
39
40
41#pragma pack(push, 1) /* (enable 8-bit struct packing) */
42
43/* Partition map. */
44
45struct gpt_hdr
46{
47 uint8_t hdr_sig[8];
48 uint32_t hdr_revision;
49 uint32_t hdr_size;
50 uint32_t hdr_crc_self;
51 uint32_t __reserved;
52 uint64_t hdr_lba_self;
53 uint64_t hdr_lba_alt;
54 uint64_t hdr_lba_start;
55 uint64_t hdr_lba_end;
56 uuid_t hdr_uuid;
57 uint64_t hdr_lba_table;
58 uint32_t hdr_entries;
59 uint32_t hdr_entsz;
60 uint32_t hdr_crc_table;
61 uint32_t padding;
62};
63
64/* Partition map entry. */
65
66struct gpt_ent
67{
68 uuid_t ent_type;
69 uuid_t ent_uuid;
70 uint64_t ent_lba_start;
71 uint64_t ent_lba_end;
72 uint64_t ent_attr;
73 uint16_t ent_name[36];
74};
75
76/* Partition map signature (hdr_sig). */
77
78#define GPT_HDR_SIG "EFI PART"
79
80/* Partition map version (hdr_revision). */
81
82#define GPT_HDR_REVISION 0x00010000
83
84/* Partition map entry flags (ent_attr). */
85
86#define GPT_ENT_ATTR_PLATFORM 0x00000001
87
88#pragma pack(pop) /* (reset to default struct packing) */
89
90#endif /* !_IOGUIDPARTITIONSCHEME_H */
91

Archive Download this file

Revision: 1340