mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 15:01:27 +02:00
part: Add accessors for struct disk_partition type_uuid
This field is only present when a CONFIG is set. To avoid annoying #ifdefs in the source code, add accessors. Update all code to use it. Note that the accessor is optional. It can be omitted if it is known that the option is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -294,10 +294,11 @@ int part_get_info_efi(struct blk_desc *desc, int part,
|
||||
(char *)disk_partition_uuid(info),
|
||||
UUID_STR_FORMAT_GUID);
|
||||
}
|
||||
#ifdef CONFIG_PARTITION_TYPE_GUID
|
||||
uuid_bin_to_str(gpt_pte[part - 1].partition_type_guid.b,
|
||||
info->type_guid, UUID_STR_FORMAT_GUID);
|
||||
#endif
|
||||
if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) {
|
||||
uuid_bin_to_str(gpt_pte[part - 1].partition_type_guid.b,
|
||||
(char *)disk_partition_type_uuid(info),
|
||||
UUID_STR_FORMAT_GUID);
|
||||
}
|
||||
|
||||
log_debug("start 0x" LBAF ", size 0x" LBAF ", name %s\n", info->start,
|
||||
info->size, info->name);
|
||||
|
Reference in New Issue
Block a user