diff options
| author | Heinrich Schuchardt <[email protected]> | 2024-04-20 16:06:16 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2024-05-01 07:37:37 +0200 |
| commit | 84aab11d3503a555ca6349da76efa4f4aedfc136 (patch) | |
| tree | 94caa654f4b71cab5803f574eeddeb58f524cdb9 | |
| parent | a55039d6a847d8c83ea2175e09d3eed6d7d83571 (diff) | |
cmd: terminate efidebug test bootmgr early on error
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 <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
| -rw-r--r-- | cmd/efidebug.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c index d1f86e76e09..c2c525f2351 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)); |
