Commit 3dca77b1 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt 💬
Browse files

efi_loader: partition numbers are hexadecimal

If we want to address partition 15 of virtio block device 11, we have to

	virtio b:f

When calling sprintf() we must use %x for the device and partition numbers.
Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <>
parent 6a1d65e5
......@@ -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",
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))
snprintf(devname, sizeof(devname), "%s:%d", pdevname,
snprintf(devname, sizeof(devname), "%s:%x", pdevname,
ret = efi_disk_add_dev(parent, dp, if_typename, desc, diskid,
&info, part, NULL);
......@@ -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");
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment