mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 17:07:38 +00:00
cmd: bootefi: Don't show usage help if EFI binary fails.
If an EFI binary returns an error code EFI_INVALID_PARAMETER, we show the
usage help for the bootefi command:
Shell> exit 0x8000000000000002
## Application failed, r = 2
bootefi - Boots an EFI payload from memory
Usage:
bootefi <image address>[:<image size>] [<fdt address>]
- boot EFI payload
bootefi bootmgr [fdt address]
- load and boot EFI payload based on BootOrder/BootXXXX variables.
If specified, the device tree located at <fdt address> gets
exposed as EFI configuration table.
This makes no sense.
Fixes: 296faf4f7e
("cmd: bootefi: re-organize do_bootefi()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
6f90a05a04
commit
46e5dd661c
1 changed files with 2 additions and 6 deletions
|
@ -154,9 +154,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
!strcmp(argv[1], "bootmgr")) {
|
!strcmp(argv[1], "bootmgr")) {
|
||||||
ret = efi_bootmgr_run(fdt);
|
ret = efi_bootmgr_run(fdt);
|
||||||
|
|
||||||
if (ret == EFI_INVALID_PARAMETER)
|
if (ret != EFI_SUCCESS)
|
||||||
return CMD_RET_USAGE;
|
|
||||||
else if (ret)
|
|
||||||
return CMD_RET_FAILURE;
|
return CMD_RET_FAILURE;
|
||||||
|
|
||||||
return CMD_RET_SUCCESS;
|
return CMD_RET_SUCCESS;
|
||||||
|
@ -218,9 +216,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||||
|
|
||||||
ret = efi_binary_run(image_buf, size, fdt);
|
ret = efi_binary_run(image_buf, size, fdt);
|
||||||
|
|
||||||
if (ret == EFI_INVALID_PARAMETER)
|
if (ret != EFI_SUCCESS)
|
||||||
return CMD_RET_USAGE;
|
|
||||||
else if (ret)
|
|
||||||
return CMD_RET_FAILURE;
|
return CMD_RET_FAILURE;
|
||||||
|
|
||||||
return CMD_RET_SUCCESS;
|
return CMD_RET_SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue