diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2017-12-11 12:56:40 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2017-12-16 23:07:55 +0100 |
commit | 7b982f009b2233821bc96d11bec20b433c40e6fa (patch) | |
tree | 1fc603f9654a27f087f96a747d1b684a14d6a5f9 /lib | |
parent | 66b051d51f3f35ab48a8e978a2a28a55b4d13208 (diff) | |
download | u-boot-7b982f009b2233821bc96d11bec20b433c40e6fa.tar.gz u-boot-7b982f009b2233821bc96d11bec20b433c40e6fa.tar.bz2 u-boot-7b982f009b2233821bc96d11bec20b433c40e6fa.zip |
efi_loader: correctly setup device paths for block devices
According to the UEFI spec the numbering of partitions has to
start with 1.
Partion number 0 is reserved for the optional device path for
the complete block device.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_device_path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 50330ddac7..5de2c0388f 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -435,7 +435,7 @@ static void *dp_part_fill(void *buf, struct blk_desc *desc, int part) if (desc->part_type == PART_TYPE_ISO) { struct efi_device_path_cdrom_path *cddp = buf; - cddp->boot_entry = part - 1; + cddp->boot_entry = part; cddp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE; cddp->dp.sub_type = DEVICE_PATH_SUB_TYPE_CDROM_PATH; cddp->dp.length = sizeof(*cddp); @@ -449,7 +449,7 @@ static void *dp_part_fill(void *buf, struct blk_desc *desc, int part) hddp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE; hddp->dp.sub_type = DEVICE_PATH_SUB_TYPE_HARD_DRIVE_PATH; hddp->dp.length = sizeof(*hddp); - hddp->partition_number = part - 1; + hddp->partition_number = part; hddp->partition_start = info.start; hddp->partition_end = info.size; if (desc->part_type == PART_TYPE_EFI) |