From edb73ee74239f3a87ab840be2e42f6fbfde51c5e Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Sun, 5 Jun 2022 16:01:40 +0200 Subject: [PATCH] boot: Drop use of GuidToString --- src/boot/efi/disk.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/boot/efi/disk.c b/src/boot/efi/disk.c index 524662603c6..a54628382c5 100644 --- a/src/boot/efi/disk.c +++ b/src/boot/efi/disk.c @@ -32,7 +32,27 @@ EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, char16_t uuid[static 37]) { if (hd.SignatureType != SIGNATURE_TYPE_GUID) continue; - GuidToString(uuid, (EFI_GUID *) &hd.Signature); + _cleanup_free_ char16_t *tmp = xasprintf( + "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + hd.Signature[3], + hd.Signature[2], + hd.Signature[1], + hd.Signature[0], + + hd.Signature[5], + hd.Signature[4], + hd.Signature[7], + hd.Signature[6], + + hd.Signature[8], + hd.Signature[9], + hd.Signature[10], + hd.Signature[11], + hd.Signature[12], + hd.Signature[13], + hd.Signature[14], + hd.Signature[15]); + strcpy16(uuid, tmp); return EFI_SUCCESS; } -- 2.47.3