On Thu, 15 Sept 2022 at 23:02, Heinrich Schuchardt <heinrich.schucha...@canonical.com> wrote: > > Fill the media ID in the block IO protocol from the block device descriptor > of the driver model. > > Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> > --- > lib/efi_loader/efi_disk.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c > index 73745ccaa0..35790aa86d 100644 > --- a/lib/efi_loader/efi_disk.c > +++ b/lib/efi_loader/efi_disk.c > @@ -476,11 +476,7 @@ static efi_status_t efi_disk_add_dev( > /* Fill in EFI IO Media info (for read/write callbacks) */ > diskobj->media.removable_media = desc->removable; > diskobj->media.media_present = 1; > - /* > - * MediaID is just an arbitrary counter. > - * We have to change it if the medium is removed or changed. > - */ > - diskobj->media.media_id = 1; > + diskobj->media.media_id = desc->media_id; > diskobj->media.block_size = desc->blksz; > diskobj->media.io_align = desc->blksz; > if (part) > -- > 2.37.2 >
Acked-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>