73 lines
2.8 KiB
Diff
73 lines
2.8 KiB
Diff
|
From 6ef2f88d014f267157d9e9300b31c5f1ab4d5e42 Mon Sep 17 00:00:00 2001
|
||
|
From: Arvin Schnell <aschnell@suse.com>
|
||
|
Date: Thu, 30 Sep 2021 13:49:30 -0700
|
||
|
Subject: [PATCH 40/43] gpt: Add linux-home flag
|
||
|
|
||
|
This sets the partition GUID to the linux home type:
|
||
|
933AC7E1-2EB4-4F13-B844-0E14E2AEF915
|
||
|
|
||
|
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
||
|
---
|
||
|
include/parted/disk.in.h | 5 +++--
|
||
|
libparted/disk.c | 2 ++
|
||
|
libparted/labels/gpt.c | 5 +++++
|
||
|
3 files changed, 10 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/include/parted/disk.in.h b/include/parted/disk.in.h
|
||
|
index 7ca6453..303f59c 100644
|
||
|
--- a/include/parted/disk.in.h
|
||
|
+++ b/include/parted/disk.in.h
|
||
|
@@ -84,10 +84,11 @@ enum _PedPartitionFlag {
|
||
|
PED_PARTITION_IRST=17,
|
||
|
PED_PARTITION_ESP=18,
|
||
|
PED_PARTITION_CHROMEOS_KERNEL=19,
|
||
|
- PED_PARTITION_BLS_BOOT=20
|
||
|
+ PED_PARTITION_BLS_BOOT=20,
|
||
|
+ PED_PARTITION_LINUX_HOME=21,
|
||
|
};
|
||
|
#define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT
|
||
|
-#define PED_PARTITION_LAST_FLAG PED_PARTITION_BLS_BOOT
|
||
|
+#define PED_PARTITION_LAST_FLAG PED_PARTITION_LINUX_HOME
|
||
|
|
||
|
enum _PedDiskTypeFeature {
|
||
|
PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */
|
||
|
diff --git a/libparted/disk.c b/libparted/disk.c
|
||
|
index 345b9e7..8496fc0 100644
|
||
|
--- a/libparted/disk.c
|
||
|
+++ b/libparted/disk.c
|
||
|
@@ -2411,6 +2411,8 @@ ped_partition_flag_get_name (PedPartitionFlag flag)
|
||
|
return N_("chromeos_kernel");
|
||
|
case PED_PARTITION_BLS_BOOT:
|
||
|
return N_("bls_boot");
|
||
|
+ case PED_PARTITION_LINUX_HOME:
|
||
|
+ return N_("linux-home");
|
||
|
|
||
|
default:
|
||
|
ped_exception_throw (
|
||
|
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
|
||
|
index 3ba3cee..8b345d5 100644
|
||
|
--- a/libparted/labels/gpt.c
|
||
|
+++ b/libparted/labels/gpt.c
|
||
|
@@ -164,6 +164,10 @@ typedef struct
|
||
|
((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 }})
|
||
|
+#define PARTITION_LINUX_HOME_GUID \
|
||
|
+ ((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 }})
|
||
|
|
||
|
struct flag_uuid_mapping_t
|
||
|
{
|
||
|
@@ -182,6 +186,7 @@ static const struct flag_uuid_mapping_t flag_uuid_mapping[] =
|
||
|
{ PED_PARTITION_ESP, PARTITION_SYSTEM_GUID },
|
||
|
{ PED_PARTITION_HPSERVICE, PARTITION_HPSERVICE_GUID },
|
||
|
{ PED_PARTITION_IRST, PARTITION_IRST_GUID },
|
||
|
+ { PED_PARTITION_LINUX_HOME, PARTITION_LINUX_HOME_GUID },
|
||
|
{ PED_PARTITION_LVM, PARTITION_LVM_GUID },
|
||
|
{ PED_PARTITION_MSFT_DATA, PARTITION_BASIC_DATA_GUID },
|
||
|
{ PED_PARTITION_MSFT_RESERVED, PARTITION_MSFT_RESERVED_GUID },
|
||
|
--
|
||
|
2.31.1
|
||
|
|