gpt: moved type map into its own header.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Michael Lotz, [email protected]. All rights reserved.
|
* Copyright 2009, Michael Lotz, [email protected]. All rights reserved.
|
||||||
* Copyright 2007-2009, Axel Dörfler, [email protected].
|
* Copyright 2007-2013, Axel Dörfler, [email protected].
|
||||||
*
|
*
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
@@ -24,6 +24,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "gpt_known_guids.h"
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_EFI_GPT
|
#define TRACE_EFI_GPT
|
||||||
#ifdef TRACE_EFI_GPT
|
#ifdef TRACE_EFI_GPT
|
||||||
@@ -36,35 +38,6 @@
|
|||||||
#define EFI_PARTITION_MODULE_NAME "partitioning_systems/efi_gpt/v1"
|
#define EFI_PARTITION_MODULE_NAME "partitioning_systems/efi_gpt/v1"
|
||||||
|
|
||||||
|
|
||||||
struct static_guid {
|
|
||||||
uint32 data1;
|
|
||||||
uint16 data2;
|
|
||||||
uint16 data3;
|
|
||||||
uint64 data4;
|
|
||||||
|
|
||||||
inline bool operator==(const guid &other) const;
|
|
||||||
} _PACKED;
|
|
||||||
|
|
||||||
const static struct type_map {
|
|
||||||
static_guid guid;
|
|
||||||
const char *type;
|
|
||||||
} kTypeMap[] = {
|
|
||||||
{{0xC12A7328, 0xF81F, 0x11D2, 0xBA4B00A0C93EC93BLL}, "EFI System Data"},
|
|
||||||
{{0x21686148, 0x6449, 0x6E6F, 0x744E656564454649LL}, "BIOS Boot Data"},
|
|
||||||
{{0x024DEE41, 0x33E7, 0x11D3, 0x9D690008C781F39FLL}, "MBR Partition Nest"},
|
|
||||||
{{0x42465331, 0x3BA3, 0x10F1, 0x802A4861696B7521LL}, "Haiku BFS"},
|
|
||||||
{{0x0FC63DAF, 0x8483, 0x4772, 0x8E793D69D8477DE4LL}, "Linux File System"},
|
|
||||||
{{0xA19D880F, 0x05FC, 0x4D3B, 0xA006743F0F84911ELL}, "Linux RAID"},
|
|
||||||
{{0x0657FD6D, 0xA4AB, 0x43C4, 0x84E50933C84B4F4FLL}, "Linux Swap"},
|
|
||||||
{{0xE6D6D379, 0xF507, 0x44C2, 0xA23C238F2A3DF928LL}, "Linux LVM"},
|
|
||||||
{{0xEBD0A0A2, 0xB9E5, 0x4433, 0x87C068B6B72699C7LL}, "Windows Data"},
|
|
||||||
{{0x48465300, 0x0000, 0x11AA, 0xAA1100306543ECACLL}, "HFS+ File System"},
|
|
||||||
{{0x55465300, 0x0000, 0x11AA, 0xAA1100306543ECACLL}, "UFS File System"},
|
|
||||||
{{0x52414944, 0x0000, 0x11AA, 0xAA1100306543ECACLL}, "Apple RAID"},
|
|
||||||
{{0x52414944, 0x5F4F, 0x11AA, 0xAA1100306543ECACLL}, "Apple RAID, offline"}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
namespace EFI {
|
namespace EFI {
|
||||||
|
|
||||||
class Header {
|
class Header {
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009, Michael Lotz, [email protected]. All rights reserved.
|
||||||
|
* Copyright 2007-2009, Axel Dörfler, [email protected].
|
||||||
|
*
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
#ifndef GPT_KNOWN_GUIDS_H
|
||||||
|
#define GPT_KNOWN_GUIDS_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <disk_device_types.h>
|
||||||
|
|
||||||
|
|
||||||
|
struct guid;
|
||||||
|
|
||||||
|
|
||||||
|
struct static_guid {
|
||||||
|
uint32 data1;
|
||||||
|
uint16 data2;
|
||||||
|
uint16 data3;
|
||||||
|
uint64 data4;
|
||||||
|
|
||||||
|
inline bool operator==(const guid &other) const;
|
||||||
|
} _PACKED;
|
||||||
|
|
||||||
|
|
||||||
|
const static struct type_map {
|
||||||
|
static_guid guid;
|
||||||
|
const char *type;
|
||||||
|
} kTypeMap[] = {
|
||||||
|
{{0xC12A7328, 0xF81F, 0x11D2, 0xBA4B00A0C93EC93BLL}, "EFI System Data"},
|
||||||
|
{{0x21686148, 0x6449, 0x6E6F, 0x744E656564454649LL}, "BIOS Boot Data"},
|
||||||
|
{{0x024DEE41, 0x33E7, 0x11D3, 0x9D690008C781F39FLL}, "MBR Partition Nest"},
|
||||||
|
{{0x42465331, 0x3BA3, 0x10F1, 0x802A4861696B7521LL}, BFS_NAME},
|
||||||
|
{{0x0FC63DAF, 0x8483, 0x4772, 0x8E793D69D8477DE4LL}, "Linux File System"},
|
||||||
|
{{0xA19D880F, 0x05FC, 0x4D3B, 0xA006743F0F84911ELL}, "Linux RAID"},
|
||||||
|
{{0x0657FD6D, 0xA4AB, 0x43C4, 0x84E50933C84B4F4FLL}, "Linux Swap"},
|
||||||
|
{{0xE6D6D379, 0xF507, 0x44C2, 0xA23C238F2A3DF928LL}, "Linux LVM"},
|
||||||
|
{{0xEBD0A0A2, 0xB9E5, 0x4433, 0x87C068B6B72699C7LL}, "Windows Data"},
|
||||||
|
{{0x48465300, 0x0000, 0x11AA, 0xAA1100306543ECACLL}, "HFS+ File System"},
|
||||||
|
{{0x55465300, 0x0000, 0x11AA, 0xAA1100306543ECACLL}, "UFS File System"},
|
||||||
|
{{0x52414944, 0x0000, 0x11AA, 0xAA1100306543ECACLL}, "Apple RAID"},
|
||||||
|
{{0x52414944, 0x5F4F, 0x11AA, 0xAA1100306543ECACLL}, "Apple RAID, offline"}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // GPT_KNOWN_GUIDS_H
|
||||||
Reference in New Issue
Block a user