public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] efi_loader: Setup logical_partition media information
@ 2017-12-11 18:22 Emmanuel Vadot
  2017-12-12  7:37 ` Heinrich Schuchardt
  2017-12-19 20:44 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Emmanuel Vadot @ 2017-12-11 18:22 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-19 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-11 18:22 [U-Boot] [PATCH] efi_loader: Setup logical_partition media information Emmanuel Vadot
2017-12-12  7:37 ` Heinrich Schuchardt
2017-12-19 20:44 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox