efi_loader: Setup logical_partition media information
PATCH 1/1 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 <[email protected]>
--- lib/efi_loader/efi_disk.c | 2 ++ 1 file changed, 2 insertions(+)
lib/efi_loader/efi_disk.c +2 -0
@@ -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:
Signature · 1 line
2.15.0
PATCH 1/1 efi_loader: Setup logical_partition media information
Quoted 14 lines · Emmanuel Vadot
When adding a partition, set the
logical_partitionmember in the media structure as mandated by the UEFI spec.Signed-off-by Emmanuel Vadot <[email protected]>--- lib/efi_loader/efi_disk.c | 2 ++ 1 file changed, 2 insertions(+)lib/efi_loader/efi_disk.c +0
-0
lib/efi_loader/efi_disk.c static void efi_disk_add_dev(const char *name, · line 265
Quoted 8 lines
lib/efi_loader/efi_disk.c +2
-0@@ -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 <[email protected]>
Quoted 5 lines · Emmanuel Vadot
When adding a partition, set the
logical_partitionmember in the media structure as mandated by the UEFI spec.Signed-off-by Emmanuel Vadot <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171219/b1764842/attachment.sig>