1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00

boot: Drop use of GuidToString

This commit is contained in:
Jan Janssen 2022-06-05 16:01:40 +02:00
parent 4c0a83a434
commit edb73ee742

View 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;
}