[PATCH v2 4/4] efi_loader: centralize messaging for efi_init_obj_list
Simon Glass
sjg at chromium.org
Wed Apr 22 03:15:34 CEST 2026
Hi Heinrich,
On 2026-04-20T22:03:17, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
> efi_loader: centralize messaging for efi_init_obj_list
>
> If efi_init_obj_list() fails we cannot use the UEFI sub-system.
>
> * Instead of having messages for this everywhere write an error message
> in efi_init_obj_list().
> * Always use (ret != EFI_SUCCESS) when checking the return value of
> efi_init_obj_list().
> * Remove the return code from the error message as it does not help
> users to understand which initialization went wrong.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>
> boot/bootmeth_efi_mgr.c | 4 ++--
> cmd/bootefi.c | 5 +----
> cmd/bootmenu.c | 6 +-----
> cmd/eficonfig.c | 6 +-----
> cmd/efidebug.c | 5 +----
> cmd/nvedit_efi.c | 10 ++--------
> lib/efi_loader/efi_bootbin.c | 5 +----
> lib/efi_loader/efi_bootmgr.c | 5 +----
> lib/efi_loader/efi_setup.c | 2 ++
> 9 files changed, 12 insertions(+), 36 deletions(-)
> diff --git a/boot/bootmeth_efi_mgr.c b/boot/bootmeth_efi_mgr.c
> @@ -58,8 +58,8 @@ static int efi_mgr_read_bootflow(struct udevice *dev, struct bootflow *bflow)
> - if (ret)
> - return log_msg_ret('init', ret);
> + if (ret != EFI_SUCCESS)
> + return ret;
This function returns int but you are returning an efi_status_t directly.
Please can you keep using log_msg_ret() here, maybe with -EIO, or
convert to an appropriate negative errno value?
Regards,
Simon
More information about the U-Boot
mailing list