summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_device_path.c
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2022-04-19 10:01:56 +0900
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-04-23 22:05:34 +0200
commit7a06fd75797d002a0201fd4e3e0de3234a62ba3c (patch)
tree7581bb635e4a1f3165ef5db0c20883a0b564bce3 /lib/efi_loader/efi_device_path.c
parentc73a0709e4a7d12107ce957105f694fdd6b7f8b6 (diff)
efi_loader: PARTITION_UUIDS should be optional
In the current implementation, partition table support (either GPT or DOS) is not mandatory. So CONFIG_PARTITION_UUIDS should not be enabled (selected) unconditionally. Fixes: commit 17f8cda505e3 ("efi_loader: set partition GUID in device path for SIG_TYPE_GUID") Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib/efi_loader/efi_device_path.c')
-rw-r--r--lib/efi_loader/efi_device_path.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 0542aaae16c..50a988c5613 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -864,11 +864,16 @@ static void *dp_part_node(void *buf, struct blk_desc *desc, int part)
break;
case SIG_TYPE_GUID:
hddp->signature_type = 2;
+#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
+ /* info.uuid exists only with PARTITION_UUIDS */
if (uuid_str_to_bin(info.uuid,
- hddp->partition_signature, 1))
+ hddp->partition_signature,
+ UUID_STR_FORMAT_GUID)) {
log_warning(
- "Partition no. %d: invalid guid: %s\n",
+ "Partition %d: invalid GUID %s\n",
part, info.uuid);
+ }
+#endif
break;
}