grub2/0494-PARTIAL-guid-Unify-GUID-types.patch
Nicolas Frayer 4fba475751 ieee1275: Upstream patches for appended signature support
Related: #RHEL-24742
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
2025-11-28 11:27:32 +01:00

36 lines
1012 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Oliver Steffen <osteffen@redhat.com>
Date: Fri, 26 May 2023 13:35:43 +0200
Subject: [PATCH] [PARTIAL] guid: Unify GUID types
There are 3 implementations of a GUID in GRUB. Replace them with
a common one, placed in types.h.
It uses the "packed" flavor of the GUID structs, the alignment attribute
is dropped, since it is not required.
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
include/grub/types.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/grub/types.h b/include/grub/types.h
index 32ca225..de6b0b3 100644
--- a/include/grub/types.h
+++ b/include/grub/types.h
@@ -355,4 +355,13 @@ struct grub_uuid
typedef char grub_bool_t;
+struct grub_guid
+{
+ grub_uint32_t data1;
+ grub_uint16_t data2;
+ grub_uint16_t data3;
+ grub_uint8_t data4[8];
+} GRUB_PACKED;
+typedef struct grub_guid grub_guid_t;
+
#endif /* ! GRUB_TYPES_HEADER */