source: mainline/uspace/lib/gpt/global.c@ 22fb7ab

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 22fb7ab was 6453e306, checked in by Martin Decky <martin@…>, 12 years ago

basic code review and coding style cleanup

  • Property mode set to 100644
File size: 7.0 KB
Line 
1/*
2 * Copyright (c) 2011-2013 Dominik Taborsky
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup libgpt
30 * @{
31 */
32/** @file
33 */
34
35#include "libgpt.h"
36
37/** GPT header signature ("EFI PART" in ASCII) */
38const uint8_t efi_signature[8] = {
39 0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54
40};
41
42const uint8_t revision[4] = {
43 00, 00, 01, 00
44};
45
46const partition_type_t gpt_ptypes[] = {
47 { "unused entry", "00000000" "0000" "0000" "0000000000000000" }, /* 0 */
48 { "HelenOS System", "3dc61fa0" "cf7a" "3ad8" "ac57615029d81a6b" }, /* "HelenOS System" encoded as RFC 4122 UUID, version 3 (MD5 name-based) */
49 { "MBR partition scheme", "024dee41" "33e7" "11d3" "9d690008c781f39f" },
50 { "EFI System", "c12a7328" "f81f" "11d2" "ba4b00a0c93ec93b" },
51 { "BIOS Boot", "21686148" "6449" "6e6f" "744e656564454649" },
52 { "Windows Reserved", "e3c9e316" "0b5c" "4db8" "817df92df00215ae" },
53 { "Windows Basic data", "ebd0a0a2" "b9e5" "4433" "87c068b6b72699c7" },
54 { "Windows LDM metadata", "5808c8aa" "7e8f" "42e0" "85d2e1e90434cfb3" },
55 { "Windows LDM data", "af9b60a0" "1431" "4f62" "bc683311714a69ad" },
56 { "Windows Recovery Environment", "de94bba4" "06d1" "4d40" "a16abfd50179d6ac" },
57 { "Windows IBM GPFS", "37affc90" "ef7d" "4e96" "91c32d7ae055b174" }, /* 10 */
58 { "Windows Cluster metadata", "db97dba9" "0840" "4bae" "97f0ffb9a327c7e1" },
59 { "HP-UX Data", "75894c1e" "3aeb" "11d3" "b7c17b03a0000000" },
60 { "HP-UX Service", "e2a1e728" "32e3" "11d6" "a6827b03a0000000" },
61 { "Linux filesystem data", "0fc63daf" "8483" "4772" "8e793d69d8477de4" },
62 { "Linux RAID", "a19d880f" "05fc" "4d3b" "a006743f0f84911e" },
63 { "Linux Swap", "0657fd6d" "a4ab" "43c4" "84e50933c84b4f4f" },
64 { "Linux LVM", "e6d6d379" "f507" "44c2" "a23c238f2a3df928" },
65 { "Linux filesystem data", "933ac7e1" "2eb4" "4f13" "b8440e14e2aef915" },
66 { "Linux Reserved", "8da63339" "0007" "60c0" "c436083ac8230908" },
67 { "FreeBSD Boot", "83bd6b9d" "7f41" "11dc" "be0b001560b84f0f" }, /* 20 */
68 { "FreeBSD Data", "516e7cb4" "6ecf" "11d6" "8ff800022d09712b" },
69 { "FreeBSD Swap", "516e7cb5" "6ecf" "11d6" "8ff800022d09712b" },
70 { "FreeBSD UFS", "516e7cb6" "6ecf" "11d6" "8ff800022d09712b" },
71 { "FreeBSD Vinum VM", "516e7cb8" "6ecf" "11d6" "8ff800022d09712b" },
72 { "FreeBSD ZFS", "516e7cba" "6ecf" "11d6" "8ff800022d09712b" },
73 { "Mac OS X HFS+", "48465300" "0000" "11aa" "aa1100306543ecac" },
74 { "Mac OS X UFS", "55465300" "0000" "11aa" "aa1100306543ecac" },
75 { "Mac OS X ZFS", "6a898cc3" "1dd2" "11b2" "99a6080020736631" },
76 { "Mac OS X RAID", "52414944" "0000" "11aa" "aa1100306543ecac" },
77 { "Mac OS X RAID, offline", "52414944" "5f4f" "11aa" "aa1100306543ecac" }, /* 30 */
78 { "Mac OS X Boot", "426f6f74" "0000" "11aa" "aa1100306543ecac" },
79 { "Mac OS X Label", "4c616265" "6c00" "11aa" "aa1100306543ecac" },
80 { "Mac OS X TV Recovery", "5265636f" "7665" "11aa" "aa1100306543ecac" },
81 { "Mac OS X Core Storage", "53746f72" "6167" "11aa" "aa1100306543ecac" },
82 { "Solaris Boot", "6a82cb45" "1dd2" "11b2" "99a6080020736631" },
83 { "Solaris Root", "6a85cf4d" "1dd2" "11b2" "99a6080020736631" },
84 { "Solaris Swap", "6a87c46f" "1dd2" "11b2" "99a6080020736631" },
85 { "Solaris Backup", "6a8b642b" "1dd2" "11b2" "99a6080020736631" },
86 { "Solaris /usr", "6a898cc3" "1dd2" "11b2" "99a6080020736631" },
87 { "Solaris /var", "6a8ef2e9" "1dd2" "11b2" "99a6080020736631" }, /* 40 */
88 { "Solaris /home", "6a90ba39" "1dd2" "11b2" "99a6080020736631" },
89 { "Solaris Alternate sector", "6a9283a5" "1dd2" "11b2" "99a6080020736631" },
90 { "Solaris Reserved", "6a945a3b" "1dd2" "11b2" "99a6080020736631" },
91 { "Solaris Reserved", "6a9630d1" "1dd2" "11b2" "99a6080020736631" },
92 { "Solaris Reserved", "6a980767" "1dd2" "11b2" "99a6080020736631" },
93 { "Solaris Reserved", "6a96237f" "1dd2" "11b2" "99a6080020736631" },
94 { "Solaris Reserved", "6a8d2ac7" "1dd2" "11b2" "99a6080020736631" },
95 { "NetBSD Swap", "49f48d32" "b10e" "11dc" "b99b0019d1879648" },
96 { "NetBSD FFS", "49f48d5a" "b10e" "11dc" "b99b0019d1879648" },
97 { "NetBSD LFS", "49f48d82" "b10e" "11dc" "b99b0019d1879648" }, /* 50 */
98 { "NetBSD RAID", "49f48daa" "b10e" "11dc" "b99b0019d1879648" },
99 { "NetBSD Concatenated", "2db519c4" "b10f" "11dc" "b99b0019d1879648" },
100 { "NetBSD Encrypted", "2db519ec" "b10f" "11dc" "b99b0019d1879648" },
101 { "ChromeOS ChromeOS kernel", "fe3a2a5d" "4f32" "41a7" "b725accc3285a309" },
102 { "ChromeOS rootfs", "3cb8e202" "3b7e" "47dd" "8a3c7ff2a13cfcec" },
103 { "ChromeOS future use", "2e0a753d" "9e48" "43b0" "8337b15192cb1b5e" },
104 { "MidnightBSD Boot", "85d5e45e" "237c" "11e1" "b4b3e89a8f7fc3a7" },
105 { "MidnightBSD Data", "85d5e45a" "237c" "11e1" "b4b3e89a8f7fc3a7" },
106 { "MidnightBSD Swap", "85d5e45b" "237c" "11e1" "b4b3e89a8f7fc3a7" },
107 { "MidnightBSD UFS", "0394ef8b" "237e" "11e1" "b4b3e89a8f7fc3a7" }, /* 60 */
108 { "MidnightBSD Vinum VM", "85d5e45c" "237c" "11e1" "b4b3e89a8f7fc3a7" },
109 { "MidnightBSD ZFS", "85d5e45d" "237c" "11e1" "b4b3e89a8f7fc3a7" },
110 { "unknown entry", NULL } /* Keep this as the last entry */
111};
Note: See TracBrowser for help on using the repository browser.