libparted 3.6
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
gpt.c File Reference

Macros

#define _(String)   (String)
 
#define EFI_PMBR_OSTYPE_EFI   0xEE
 
#define GPT_DEFAULT_PARTITION_ENTRIES
 
#define GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE   16384
 
#define GPT_HEADER_REVISION_V0_99   0x00009900
 
#define GPT_HEADER_REVISION_V1_00   0x00010000
 
#define GPT_HEADER_REVISION_V1_02   0x00010200
 
#define GPT_HEADER_SECTORS   1
 
#define GPT_HEADER_SIGNATURE   0x5452415020494645LL
 
#define GPT_PMBR_LBA   0
 
#define GPT_PMBR_SECTORS   1
 
#define GPT_PRIMARY_HEADER_LBA   1
 
#define GPT_PRIMARY_PART_TABLE_LBA   2
 
#define LEGACY_MBR_PARTITION_GUID
 
#define MSDOS_MBR_SIGNATURE   0xaa55
 
#define PARTITION_APPLE_HFS_GUID
 
#define PARTITION_APPLE_TV_RECOVERY_GUID
 
#define PARTITION_BASIC_DATA_GUID
 
#define PARTITION_BIOS_GRUB_GUID
 
#define PARTITION_BLS_BOOT_GUID
 
#define PARTITION_CHROMEOS_KERNEL_GUID
 
#define PARTITION_HPSERVICE_GUID
 
#define PARTITION_IRST_GUID
 
#define PARTITION_LINUX_DATA_GUID
 
#define PARTITION_LINUX_HOME_GUID
 
#define PARTITION_LVM_GUID
 
#define PARTITION_MSFT_RECOVERY
 
#define PARTITION_MSFT_RESERVED_GUID
 
#define PARTITION_PREP_GUID
 
#define PARTITION_RAID_GUID
 
#define PARTITION_RESERVED_GUID
 
#define PARTITION_SWAP_GUID
 
#define PARTITION_SYSTEM_GUID
 
#define UNUSED_ENTRY_GUID
 

Typedefs

typedef uint16_t efi_char16_t
 
typedef struct _GPTDiskData GPTDiskData
 
typedef struct _GPTPartitionData GPTPartitionData
 
typedef struct _GuidPartitionEntry_t GuidPartitionEntry_t
 
typedef struct _GuidPartitionEntryAttributes_t GuidPartitionEntryAttributes_t
 
typedef struct _GuidPartitionTableHeader_t GuidPartitionTableHeader_t
 
typedef struct _LegacyMBR_t LegacyMBR_t
 
typedef struct _PartitionRecord_t PartitionRecord_t
 

Functions

struct __attribute__ ((packed))
 
struct __attribute__ ((packed, aligned(8)))
 
void ped_disk_gpt_done ()
 
void ped_disk_gpt_init ()
 
 PT_define_limit_functions (gpt)
 
 verify (sizeof(GuidPartitionEntry_t)==128)
 
 verify (sizeof(GuidPartitionEntryAttributes_t)==8)
 

Macro Definition Documentation

◆ _

#define _ (   String)    (String)

◆ EFI_PMBR_OSTYPE_EFI

#define EFI_PMBR_OSTYPE_EFI   0xEE

◆ GPT_DEFAULT_PARTITION_ENTRIES

#define GPT_DEFAULT_PARTITION_ENTRIES
Value:
#define GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE
Definition: gpt.c:290
struct _GuidPartitionEntry_t GuidPartitionEntry_t
Definition: gpt.c:72

◆ GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE

#define GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE   16384

◆ GPT_HEADER_REVISION_V0_99

#define GPT_HEADER_REVISION_V0_99   0x00009900

◆ GPT_HEADER_REVISION_V1_00

#define GPT_HEADER_REVISION_V1_00   0x00010000

◆ GPT_HEADER_REVISION_V1_02

#define GPT_HEADER_REVISION_V1_02   0x00010200

◆ GPT_HEADER_SECTORS

#define GPT_HEADER_SECTORS   1

◆ GPT_HEADER_SIGNATURE

#define GPT_HEADER_SIGNATURE   0x5452415020494645LL

◆ GPT_PMBR_LBA

#define GPT_PMBR_LBA   0

◆ GPT_PMBR_SECTORS

#define GPT_PMBR_SECTORS   1

◆ GPT_PRIMARY_HEADER_LBA

#define GPT_PRIMARY_HEADER_LBA   1

◆ GPT_PRIMARY_PART_TABLE_LBA

#define GPT_PRIMARY_PART_TABLE_LBA   2

◆ LEGACY_MBR_PARTITION_GUID

#define LEGACY_MBR_PARTITION_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x024DEE41), PED_CPU_TO_LE16 (0x33E7), \
PED_CPU_TO_LE16 (0x11d3, 0x9D, 0x69, \
{ 0x00, 0x08, 0xC7, 0x81, 0xF3, 0x9F }})
#define PED_CPU_TO_LE32(x)
Definition: endian.h:71
#define PED_CPU_TO_LE16(x)
Definition: endian.h:69

◆ MSDOS_MBR_SIGNATURE

#define MSDOS_MBR_SIGNATURE   0xaa55

◆ PARTITION_APPLE_HFS_GUID

#define PARTITION_APPLE_HFS_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x48465300), PED_CPU_TO_LE16 (0x0000), \
PED_CPU_TO_LE16 (0x11AA), 0xaa, 0x11, \
{ 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC }})

◆ PARTITION_APPLE_TV_RECOVERY_GUID

#define PARTITION_APPLE_TV_RECOVERY_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x5265636F), PED_CPU_TO_LE16 (0x7665), \
PED_CPU_TO_LE16 (0x11AA), 0xaa, 0x11, \
{ 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC }})

◆ PARTITION_BASIC_DATA_GUID

#define PARTITION_BASIC_DATA_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xEBD0A0A2), PED_CPU_TO_LE16 (0xB9E5), \
PED_CPU_TO_LE16 (0x4433), 0x87, 0xC0, \
{ 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7 }})

◆ PARTITION_BIOS_GRUB_GUID

#define PARTITION_BIOS_GRUB_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x21686148), PED_CPU_TO_LE16 (0x6449), \
PED_CPU_TO_LE16 (0x6E6f), 0x74, 0x4E, \
{ 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 }})

◆ PARTITION_BLS_BOOT_GUID

#define PARTITION_BLS_BOOT_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xbc13c2ff), PED_CPU_TO_LE16 (0x59e6), \
PED_CPU_TO_LE16 (0x4262), 0xa3, 0x52, \
{ 0xb2, 0x75, 0xfd, 0x6f, 0x71, 0x72 }})

◆ PARTITION_CHROMEOS_KERNEL_GUID

#define PARTITION_CHROMEOS_KERNEL_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xfe3a2a5d), PED_CPU_TO_LE16 (0x4f32), \
PED_CPU_TO_LE16 (0x41a7), 0xb7, 0x25, \
{ 0xac, 0xcc, 0x32, 0x85, 0xa3, 0x09 }})

◆ PARTITION_HPSERVICE_GUID

#define PARTITION_HPSERVICE_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xe2a1e728), PED_CPU_TO_LE16 (0x32e3), \
PED_CPU_TO_LE16 (0x11d6), 0xa6, 0x82, \
{ 0x7b, 0x03, 0xa0, 0x00, 0x00, 0x00 }})

◆ PARTITION_IRST_GUID

#define PARTITION_IRST_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xD3BFE2DE), PED_CPU_TO_LE16 (0x3DAF), \
PED_CPU_TO_LE16 (0x11DF), 0xba, 0x40, \
{ 0xE3, 0xA5, 0x56, 0xD8, 0x95, 0x93 }})

◆ PARTITION_LINUX_DATA_GUID

#define PARTITION_LINUX_DATA_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x0FC63DAF), PED_CPU_TO_LE16 (0x8483), \
PED_CPU_TO_LE16 (0x4772), 0x8E, 0x79, \
{ 0x3D, 0x69, 0xD8, 0x47, 0x7D, 0xE4 }})

◆ PARTITION_LINUX_HOME_GUID

#define PARTITION_LINUX_HOME_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x933ac7e1), PED_CPU_TO_LE16 (0x2eb4), \
PED_CPU_TO_LE16 (0x4f13), 0xb8, 0x44, \
{ 0x0e, 0x14, 0xe2, 0xae, 0xf9, 0x15 }})

◆ PARTITION_LVM_GUID

#define PARTITION_LVM_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xe6d6d379), PED_CPU_TO_LE16 (0xf507), \
PED_CPU_TO_LE16 (0x44c2), 0xa2, 0x3c, \
{ 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28 }})

◆ PARTITION_MSFT_RECOVERY

#define PARTITION_MSFT_RECOVERY
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xDE94BBA4), PED_CPU_TO_LE16 (0x06D1), \
PED_CPU_TO_LE16 (0x4D40), 0xA1, 0x6A, \
{ 0xBF, 0xD5, 0x01, 0x79, 0xD6, 0xAC }})

◆ PARTITION_MSFT_RESERVED_GUID

#define PARTITION_MSFT_RESERVED_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xE3C9E316), PED_CPU_TO_LE16 (0x0B5C), \
PED_CPU_TO_LE16 (0x4DB8), 0x81, 0x7D, \
{ 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE }})

◆ PARTITION_PREP_GUID

#define PARTITION_PREP_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x9e1a2d38), PED_CPU_TO_LE16 (0xc612), \
PED_CPU_TO_LE16 (0x4316), 0xaa, 0x26, \
{ 0x8b, 0x49, 0x52, 0x1e, 0x5a, 0x8b }})

◆ PARTITION_RAID_GUID

#define PARTITION_RAID_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xa19d880f), PED_CPU_TO_LE16 (0x05fc), \
PED_CPU_TO_LE16 (0x4d3b), 0xa0, 0x06, \
{ 0x74, 0x3f, 0x0f, 0x84, 0x91, 0x1e }})

◆ PARTITION_RESERVED_GUID

#define PARTITION_RESERVED_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x8da63339), PED_CPU_TO_LE16 (0x0007), \
PED_CPU_TO_LE16 (0x60c0), 0xc4, 0x36, \
{ 0x08, 0x3a, 0xc8, 0x23, 0x09, 0x08 }})

◆ PARTITION_SWAP_GUID

#define PARTITION_SWAP_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0x0657fd6d), PED_CPU_TO_LE16 (0xa4ab), \
PED_CPU_TO_LE16 (0x43c4), 0x84, 0xe5, \
{ 0x09, 0x33, 0xc8, 0x4b, 0x4f, 0x4f }})

◆ PARTITION_SYSTEM_GUID

#define PARTITION_SYSTEM_GUID
Value:
((efi_guid_t) { PED_CPU_TO_LE32 (0xC12A7328), PED_CPU_TO_LE16 (0xF81F), \
PED_CPU_TO_LE16 (0x11d2), 0xBA, 0x4B, \
{ 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B }})

◆ UNUSED_ENTRY_GUID

#define UNUSED_ENTRY_GUID
Value:
((efi_guid_t) { 0x00000000, 0x0000, 0x0000, 0x00, 0x00, \
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }})

Typedef Documentation

◆ efi_char16_t

typedef uint16_t efi_char16_t

◆ GPTDiskData

typedef struct _GPTDiskData GPTDiskData

◆ GPTPartitionData

typedef struct _GPTPartitionData GPTPartitionData

◆ GuidPartitionEntry_t

typedef struct _GuidPartitionEntry_t GuidPartitionEntry_t

◆ GuidPartitionEntryAttributes_t

typedef struct _GuidPartitionEntryAttributes_t GuidPartitionEntryAttributes_t

◆ GuidPartitionTableHeader_t

typedef struct _GuidPartitionTableHeader_t GuidPartitionTableHeader_t

◆ LegacyMBR_t

typedef struct _LegacyMBR_t LegacyMBR_t

◆ PartitionRecord_t

typedef struct _PartitionRecord_t PartitionRecord_t

Function Documentation

◆ __attribute__() [1/2]

struct __attribute__ ( (packed)  )

◆ __attribute__() [2/2]

struct __attribute__ ( (packed, aligned(8))  )

◆ ped_disk_gpt_done()

void ped_disk_gpt_done ( )

◆ ped_disk_gpt_init()

void ped_disk_gpt_init ( )

◆ PT_define_limit_functions()

PT_define_limit_functions ( gpt  )

◆ verify() [1/2]

verify ( sizeof(GuidPartitionEntry_t = =128)

◆ verify() [2/2]

verify ( sizeof(GuidPartitionEntryAttributes_t = =8)