]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Drop use of GuidToString
authorJan Janssen <medhefgo@web.de>
Sun, 5 Jun 2022 14:01:40 +0000 (16:01 +0200)
committerJan Janssen <medhefgo@web.de>
Fri, 20 Jan 2023 19:55:11 +0000 (20:55 +0100)
src/boot/efi/disk.c

index 524662603c6659d5031f495397453b0f28b8bbdf..a54628382c55eaafe17ace4d1e551f452951d251 100644 (file)
@@ -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;
         }