aboutsummaryrefslogtreecommitdiff
path: root/disk/part_efi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-18 07:55:54 -0500
committerTom Rini <trini@konsulko.com>2021-01-18 07:55:54 -0500
commit19c5fdffdc41bfd606b455b46e834d1bff4b2c1e (patch)
treedb1c5abebf12e9aaef80d8e22a472357027b5287 /disk/part_efi.c
parent14ea1b3635b4af8d9e283e3671f7ee872d50b859 (diff)
parentad80a8d0877922db95fd0410314504c840d9d850 (diff)
Merge branch '2021-01-16-assorted-improvements'
- Assorted testing improvements and fixes - Assorted code cleanups
Diffstat (limited to 'disk/part_efi.c')
-rw-r--r--disk/part_efi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 60b1c1d761..2f922662e6 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -247,10 +247,11 @@ void part_print_efi(struct blk_desc *dev_desc)
uuid_bin = (unsigned char *)gpt_pte[i].partition_type_guid.b;
uuid_bin_to_str(uuid_bin, uuid, UUID_STR_FORMAT_GUID);
printf("\ttype:\t%s\n", uuid);
-#ifdef CONFIG_PARTITION_TYPE_GUID
- if (!uuid_guid_get_str(uuid_bin, uuid))
- printf("\ttype:\t%s\n", uuid);
-#endif
+ if (CONFIG_IS_ENABLED(PARTITION_TYPE_GUID)) {
+ const char *type = uuid_guid_get_str(uuid_bin);
+ if (type)
+ printf("\ttype:\t%s\n", type);
+ }
uuid_bin = (unsigned char *)gpt_pte[i].unique_partition_guid.b;
uuid_bin_to_str(uuid_bin, uuid, UUID_STR_FORMAT_GUID);
printf("\tguid:\t%s\n", uuid);