u-boot/boot
Simon Glass 13819f07ea bootm: Change incorrect 'unsupported' error
At present when bootm fails, it says:

    subcommand not supported

and then prints help for the bootm command. This is not very useful, since
generally the error is related to something else, such as fixups failing.
It is quite confusing to see this in a test run.

Change the error and show the error code.

We could update the OS functions to return -ENOSYS when they do not
support the bootm subcommand. But this involves some thought since this is
arch-specific code and proper errno error codes are not always returned.
Also, with the code as is, all required subcommands are of course
supported - a problem would only come if someone added a new one or
removed support for one from an existing OS. Therefore it seems better to
leave that sort of effort for when our bootm tests are improved.

Note: v1 of this patch generated a discussion[1] about printing error
strings automatically using printf(). That is outside the scope of this
patch but will be dealt with separately.

[1] https://patchwork.ozlabs.org/project/uboot/patch/20220909151801.336551-3-sjg@chromium.org/

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-17 21:17:12 -06:00
..
android_ab.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
boot_fit.c treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
bootdev-uclass.c bootstd: Fix listing boot devices 2022-10-17 21:17:12 -06:00
bootflow.c bootstd: Allow scanning for global bootmeths separately 2022-08-12 08:17:11 -04:00
bootm_os.c treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
bootm.c bootm: Change incorrect 'unsupported' error 2022-10-17 21:17:12 -06:00
bootmeth_distro.c Rename disto_[pxe_]getfile to distro_[pxe_]getfile 2022-08-26 16:33:48 -06:00
bootmeth_efi_mgr.c bootstd: Allow EFI bootmgr to support an invalid bootflow 2022-08-12 08:17:10 -04:00
bootmeth_efi.c bootstd: Add an implementation of EFI boot 2022-04-25 10:00:04 -04:00
bootmeth_pxe.c Rename disto_[pxe_]getfile to distro_[pxe_]getfile 2022-08-26 16:33:48 -06:00
bootmeth_sandbox.c bootstd: Add a sandbox bootmeth driver 2022-04-25 10:00:04 -04:00
bootmeth_script.c bootstd: Add an implementation of script boot 2022-04-25 10:00:04 -04:00
bootmeth-uclass.c bootstd: Allow scanning for global bootmeths separately 2022-08-12 08:17:11 -04:00
bootretry.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
bootstd-uclass.c bootstd: Drop the system bootdev 2022-08-12 08:17:11 -04:00
common_fit.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
fdt_region.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android-dt.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android.c treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
image-board.c treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
image-cipher.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-fdt.c event: Pass the images to EVT_FT_FIXUP 2022-09-29 16:07:58 -04:00
image-fit-sig.c tools: Pass the key blob around 2022-01-26 08:50:44 -07:00
image-fit.c treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
image-host.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-pre-load.c boot: image-pre-load: Check environment for location of signature info 2022-10-11 15:40:48 -04:00
image-sig.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image.c treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
Kconfig vbe: Support VBE simple 2022-08-12 08:17:11 -04:00
Makefile vbe: Support VBE simple 2022-08-12 08:17:11 -04:00
pxe_utils.c cmd: pxe: add alias devicetree-overlay for fdtoverlays 2022-10-11 15:40:48 -04:00
vbe_simple.c dm: core: Split ofnode_path_root() into two functions 2022-09-29 22:43:43 -04:00
vbe.c boot: fix vbe_find_first_device() 2022-08-26 16:32:59 -06:00