aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@freebsd.org>2017-12-11 19:22:33 +0100
committerTom Rini <trini@konsulko.com>2017-12-19 07:57:02 -0500
commit5f7708362812dc5c0647cdae4f05a85e57b3cf32 (patch)
tree05cdfcda96504e3b424d19c5b850de15ab8e6bfe /lib
parent9da71fc83a38e9dbf71240b3e548f6b37417764a (diff)
downloadu-boot-5f7708362812dc5c0647cdae4f05a85e57b3cf32.zip
u-boot-5f7708362812dc5c0647cdae4f05a85e57b3cf32.tar.gz
u-boot-5f7708362812dc5c0647cdae4f05a85e57b3cf32.tar.bz2
efi_loader: Setup logical_partition media information
When adding a partition, set the logical_partition member in the media structure as mandated by the UEFI spec. Signed-off-by: Emmanuel Vadot <manu@freebsd.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_disk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index 4e457a8..d299fc8 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -258,6 +258,8 @@ static void efi_disk_add_dev(const char *name,
diskobj->media.block_size = desc->blksz;
diskobj->media.io_align = desc->blksz;
diskobj->media.last_block = desc->lba - offset;
+ if (part != 0)
+ diskobj->media.logical_partition = 1;
diskobj->ops.media = &diskobj->media;
return;
out_of_memory: