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>
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 @@
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: