[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 7/7] commands/bli: use grub_gpt_part_guid_snprint
From: |
Oliver Steffen |
Subject: |
[PATCH v2 7/7] commands/bli: use grub_gpt_part_guid_snprint |
Date: |
Mon, 20 Feb 2023 19:56:30 +0100 |
Use the new function for printing the partition guid.
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
---
grub-core/commands/bli.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/grub-core/commands/bli.c b/grub-core/commands/bli.c
index 10993222d..160cbdb34 100644
--- a/grub-core/commands/bli.c
+++ b/grub-core/commands/bli.c
@@ -83,14 +83,10 @@ get_part_uuid (grub_device_t dev, char **part_uuid)
}
guid = &entry.guid;
- *part_uuid = grub_xasprintf (
- "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- grub_le_to_cpu32 (guid->data1), grub_le_to_cpu16 (guid->data2),
- grub_le_to_cpu16 (guid->data3), guid->data4[0], guid->data4[1],
- guid->data4[2], guid->data4[3], guid->data4[4], guid->data4[5],
- guid->data4[6], guid->data4[7]);
+ *part_uuid = grub_calloc (GRUB_GPT_GUID_STR_LEN + 1, sizeof (char));
if (*part_uuid == NULL)
status = grub_errno;
+ grub_gpt_part_guid_snprint (*part_uuid, GRUB_GPT_GUID_STR_LEN + 1, guid);
fail:
grub_disk_close (disk);
--
2.39.2
- [PATCH v2 0/7] Add basic Boot Loader Interface support, Oliver Steffen, 2023/02/20
- [PATCH v2 3/7] Add a module for the Boot Loader Interface, Oliver Steffen, 2023/02/20
- [PATCH v2 1/7] efi: add grub_efi_set_variable_with_attributes, Oliver Steffen, 2023/02/20
- [PATCH v2 4/7] util/grub.d: activate bli module on EFI, Oliver Steffen, 2023/02/20
- [PATCH v2 2/7] efi: check for integer overflow in string conversion, Oliver Steffen, 2023/02/20
- [PATCH v2 7/7] commands/bli: use grub_gpt_part_guid_snprint,
Oliver Steffen <=
- [PATCH v2 6/7] commands/probe: use grub_gpt_part_guid_snprint, Oliver Steffen, 2023/02/20
- [PATCH v2 5/7] partmap/gpt: add print function for guids, Oliver Steffen, 2023/02/20