From 3dca77b1dc1b6dbf9c8b51572fe4b0553cef009f Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 25 May 2021 18:00:13 +0200 Subject: efi_loader: partition numbers are hexadecimal If we want to address partition 15 of virtio block device 11, we have to write: virtio b:f When calling sprintf() we must use %x for the device and partition numbers. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/efi_loader/efi_disk.c') diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 307d5d759b8..988907ecb91 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -476,7 +476,7 @@ static efi_status_t efi_disk_add_dev( efi_system_partition.if_type = desc->if_type; efi_system_partition.devnum = desc->devnum; efi_system_partition.part = part; - EFI_PRINT("EFI system partition: %s %d:%d\n", + EFI_PRINT("EFI system partition: %s %x:%x\n", blk_get_if_type_name(desc->if_type), desc->devnum, part); } @@ -521,7 +521,7 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc, if (part_get_info(desc, part, &info)) continue; - snprintf(devname, sizeof(devname), "%s:%d", pdevname, + snprintf(devname, sizeof(devname), "%s:%x", pdevname, part); ret = efi_disk_add_dev(parent, dp, if_typename, desc, diskid, &info, part, NULL); -- cgit v1.2.3