Hi Heinrich,

On Mon Apr 21, 2025 at 7:25 PM EEST, Heinrich Schuchardt wrote:
> The EFI boot manager bootmeth does not require variable BootOrder to be
> preexisting. It creates this variable.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
> ---
>  boot/bootmeth_efi_mgr.c | 21 +++------------------
>  1 file changed, 3 insertions(+), 18 deletions(-)
>
> diff --git a/boot/bootmeth_efi_mgr.c b/boot/bootmeth_efi_mgr.c
> index 42b8863815e..1669cbed5bd 100644
> --- a/boot/bootmeth_efi_mgr.c
> +++ b/boot/bootmeth_efi_mgr.c
> @@ -47,30 +47,15 @@ static int efi_mgr_check(struct udevice *dev, struct 
> bootflow_iter *iter)
>
>  static int efi_mgr_read_bootflow(struct udevice *dev, struct bootflow *bflow)
>  {
> -     struct efi_mgr_priv *priv = dev_get_priv(dev);
> -     efi_status_t ret;
> -     efi_uintn_t size;
> -     u16 *bootorder;
> -
> -     if (priv->fake_dev) {
> -             bflow->state = BOOTFLOWST_READY;
> -             return 0;
> -     }

This only seems to be used by sandbox AFAICT. So I think we should remove the
struct members and functions as well with this change

> +     int ret

ret;

>
>       ret = efi_init_obj_list();
>       if (ret)
>               return log_msg_ret("init", ret);
>
> -     /* Enable this method if the "BootOrder" UEFI exists. */
> -     bootorder = efi_get_var(u"BootOrder", &efi_global_variable_guid,
> -                             &size);
> -     if (bootorder) {
> -             free(bootorder);
> -             bflow->state = BOOTFLOWST_READY;
> -             return 0;
> -     }
> +     bflow->state = BOOTFLOWST_READY;
>
> -     return -EINVAL;
> +     return 0;
>  }
>
>  static int efi_mgr_read_file(struct udevice *dev, struct bootflow *bflow,

Other than that it looks correct

Cheers
/Ilias

Reply via email to