[U-Boot] [PATCH] efi_loader: Setup logical_partition media information
Heinrich Schuchardt
xypron.glpk at gmx.de
Tue Dec 12 07:37:13 UTC 2017
On 12/11/2017 07:22 PM, Emmanuel Vadot wrote:
> 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 at freebsd.org>
> ---
> lib/efi_loader/efi_disk.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
> index 4e457a841b..d299fc8dea 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:
>
Setting logical_partition is described in chapter
13.9 Block I/O Protocol of UEFI Spec 2.7.
Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
More information about the U-Boot
mailing list