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_var_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/efi_loader/efi_var_file.c') diff --git a/lib/efi_loader/efi_var_file.c b/lib/efi_loader/efi_var_file.c index b171d2d1a8f..de076b8cbc4 100644 --- a/lib/efi_loader/efi_var_file.c +++ b/lib/efi_loader/efi_var_file.c @@ -35,7 +35,7 @@ static efi_status_t __maybe_unused efi_set_blk_dev_to_system_partition(void) log_err("No EFI system partition\n"); return EFI_DEVICE_ERROR; } - snprintf(part_str, PART_STR_LEN, "%u:%u", + snprintf(part_str, PART_STR_LEN, "%x:%x", efi_system_partition.devnum, efi_system_partition.part); r = fs_set_blk_dev(blk_get_if_type_name(efi_system_partition.if_type), part_str, FS_TYPE_ANY); -- cgit v1.2.3