forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0041-gptprio-Use-Bottlerocket-boot-partition-type-GUID.patch
58 lines (50 loc) · 2.29 KB
/
0041-gptprio-Use-Bottlerocket-boot-partition-type-GUID.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From b6ae405132d795bfbb405dbf15fcb5721428b435 Mon Sep 17 00:00:00 2001
From: iliana destroyer of worlds <[email protected]>
Date: Thu, 28 Mar 2019 16:28:41 -0700
Subject: [PATCH] gptprio: Use Bottlerocket boot partition type GUID
Signed-off-by: iliana destroyer of worlds <[email protected]>
---
grub-core/commands/gptprio.c | 2 +-
include/grub/gpt_partition.h | 6 +++---
tests/gptprio_test.in | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/grub-core/commands/gptprio.c b/grub-core/commands/gptprio.c
index 8908d8b..761aea4 100644
--- a/grub-core/commands/gptprio.c
+++ b/grub-core/commands/gptprio.c
@@ -162,7 +162,7 @@ grub_cmd_next (grub_extcmd_context_t ctxt, int argc, char **args)
char *p, *root = NULL, *part_name = NULL, *part_guid = NULL;
/* TODO: Add a uuid parser and a command line flag for providing type. */
- grub_gpt_part_guid_t part_type = GRUB_GPT_PARTITION_TYPE_USR_X86_64;
+ grub_gpt_part_guid_t part_type = GRUB_GPT_PARTITION_TYPE_BOTTLEROCKET_BOOT;
if (!state[NEXT_SET_DEVICE].set || !state[NEXT_SET_UUID].set)
{
diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
index 797692c..2bbfd33 100644
--- a/include/grub/gpt_partition.h
+++ b/include/grub/gpt_partition.h
@@ -61,9 +61,9 @@ char * grub_gpt_guid_to_str (grub_gpt_guid_t *guid);
GRUB_GPT_GUID_INIT (0x5808c8aa, 0x7e8f, 0x42e0, \
0x85, 0xd2, 0xe1, 0xe9, 0x04, 0x34, 0xcf, 0xb3)
-#define GRUB_GPT_PARTITION_TYPE_USR_X86_64 \
- GRUB_GPT_GUID_INIT (0x5dfbf5f4, 0x2848, 0x4bac, \
- 0xaa, 0x5e, 0x0d, 0x9a, 0x20, 0xb7, 0x45, 0xa6)
+#define GRUB_GPT_PARTITION_TYPE_BOTTLEROCKET_BOOT \
+ GRUB_GPT_GUID_INIT (0x6b636168, 0x7420, 0x6568, \
+ 0x20, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x21)
#define GRUB_GPT_HEADER_MAGIC \
{ 0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54 }
diff --git a/tests/gptprio_test.in b/tests/gptprio_test.in
index c5cf0f3..9df4dd3 100644
--- a/tests/gptprio_test.in
+++ b/tests/gptprio_test.in
@@ -59,7 +59,7 @@ esac
img1="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
trap "rm -f '${img1}'" EXIT
-prio_type="5dfbf5f4-2848-4bac-aa5e-0d9a20b745a6"
+prio_type="6b636168-7420-6568-2070-6c616e657421"
declare -a prio_uuid
prio_uuid[2]="9b003904-d006-4ab3-97f1-73f547b7af1a"
prio_uuid[3]="1aa5a658-5b02-414d-9b71-f7e6c151f0cd"
--
2.21.3