Print a message for debug purposes when an EFI System Partition (ESP) is detected on the device to indicate how many devices are detected. Only one ESP device is used for capsule update; if multiple ESP devices are found, it may indicate corruption in UEFI variables. This is for informational purposes only, as the number of removable media connected to a given board cannot be controlled.
Signed-off-by: Padmarao Begari <[email protected]> --- lib/efi_loader/efi_disk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 130c4db9606..8391de1527c 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -565,6 +565,11 @@ static efi_status_t efi_disk_add_dev( diskobj->media.removable_media, diskobj->media.last_block); + if (part_info && part_info->bootable & PART_EFI_SYSTEM_PARTITION) + printf("EFI system partition: %s %x:%x\n", + blk_get_uclass_name(desc->uclass_id), + desc->devnum, part); + /* Store first EFI system partition */ if (part && efi_system_partition.uclass_id == UCLASS_INVALID) { if (part_info && -- 2.34.1

