* [PATCH] cmd: terminate efidebug test bootmgr early on error
@ 2024-04-20 14:06 Heinrich Schuchardt
2024-04-20 14:57 ` Ilias Apalodimas
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2024-04-20 14:06 UTC (permalink / raw)
To: Ilias Apalodimas
Cc: Masahisa Kojima, AKASHI Takahiro, u-boot, Heinrich Schuchardt
If efi_bootmgr_load() fails, there is no point in trying to start an image
that has not been loaded.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
cmd/efidebug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index a587860e2a5..5103ada29a5 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -1397,6 +1397,8 @@ static __maybe_unused int do_efi_test_bootmgr(struct cmd_tbl *cmdtp, int flag,
ret = efi_bootmgr_load(&image, &load_options);
printf("efi_bootmgr_load() returned: %ld\n", ret & ~EFI_ERROR_MASK);
+ if (ret != EFI_SUCCESS)
+ return CMD_RET_SUCCESS;
/* We call efi_start_image() even if error for test purpose. */
ret = EFI_CALL(efi_start_image(image, &exit_data_size, &exit_data));
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cmd: terminate efidebug test bootmgr early on error
2024-04-20 14:06 [PATCH] cmd: terminate efidebug test bootmgr early on error Heinrich Schuchardt
@ 2024-04-20 14:57 ` Ilias Apalodimas
0 siblings, 0 replies; 2+ messages in thread
From: Ilias Apalodimas @ 2024-04-20 14:57 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Masahisa Kojima, AKASHI Takahiro, u-boot
On Sat, 20 Apr 2024 at 17:06, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> If efi_bootmgr_load() fails, there is no point in trying to start an image
> that has not been loaded.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> cmd/efidebug.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/cmd/efidebug.c b/cmd/efidebug.c
> index a587860e2a5..5103ada29a5 100644
> --- a/cmd/efidebug.c
> +++ b/cmd/efidebug.c
> @@ -1397,6 +1397,8 @@ static __maybe_unused int do_efi_test_bootmgr(struct cmd_tbl *cmdtp, int flag,
>
> ret = efi_bootmgr_load(&image, &load_options);
> printf("efi_bootmgr_load() returned: %ld\n", ret & ~EFI_ERROR_MASK);
> + if (ret != EFI_SUCCESS)
> + return CMD_RET_SUCCESS;
>
> /* We call efi_start_image() even if error for test purpose. */
> ret = EFI_CALL(efi_start_image(image, &exit_data_size, &exit_data));
> --
> 2.43.0
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-20 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-20 14:06 [PATCH] cmd: terminate efidebug test bootmgr early on error Heinrich Schuchardt
2024-04-20 14:57 ` Ilias Apalodimas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.