doc: usage: Add general rule for `$?`
authorTom Rini <trini@konsulko.com>
Fri, 24 Oct 2025 16:02:57 +0000 (10:02 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 26 Oct 2025 15:03:35 +0000 (09:03 -0600)
commit11da3403e91c9f510495c75d07750b6ac3c3b2e7
treeb6600db067b5260e8957a67e69b22c0e28111312
parent1f6da608c3d9a9a7d189177614cfb8d6a1ad8d6c
doc: usage: Add general rule for `$?`

For nearly all commands in U-Boot the '?' variable is handled the same
way with 0 meaning success, 1 meaning any failure.  Explain this in the
general rules section of the cmdline documentation (with a link to a
counter example) and then remove the redundant wording from most
commands. We retain a section about the return value in a number of
places where we are doing something such as always returning a specific
value or we have useful additional information to go along with the
normal return codes.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
45 files changed:
doc/usage/cmd/armffa.rst
doc/usage/cmd/bdinfo.rst
doc/usage/cmd/bind.rst
doc/usage/cmd/blkcache.rst
doc/usage/cmd/cat.rst
doc/usage/cmd/cli.rst
doc/usage/cmd/cls.rst
doc/usage/cmd/cp.rst
doc/usage/cmd/cpu.rst
doc/usage/cmd/cpuid.rst
doc/usage/cmd/dmareset.rst
doc/usage/cmd/ebtupdate.rst
doc/usage/cmd/fatinfo.rst
doc/usage/cmd/fdt.rst
doc/usage/cmd/font.rst
doc/usage/cmd/fuse.rst
doc/usage/cmd/gpio.rst
doc/usage/cmd/host.rst
doc/usage/cmd/i3c.rst
doc/usage/cmd/imxtract.rst
doc/usage/cmd/loadb.rst
doc/usage/cmd/loadm.rst
doc/usage/cmd/loads.rst
doc/usage/cmd/loadx.rst
doc/usage/cmd/loady.rst
doc/usage/cmd/msr.rst
doc/usage/cmd/mtest.rst
doc/usage/cmd/optee.rst
doc/usage/cmd/part.rst
doc/usage/cmd/pause.rst
doc/usage/cmd/pinmux.rst
doc/usage/cmd/pwm.rst
doc/usage/cmd/saves.rst
doc/usage/cmd/scmi.rst
doc/usage/cmd/setexpr.rst
doc/usage/cmd/size.rst
doc/usage/cmd/smbios.rst
doc/usage/cmd/sound.rst
doc/usage/cmd/source.rst
doc/usage/cmd/temperature.rst
doc/usage/cmd/tftpput.rst
doc/usage/cmd/unbind.rst
doc/usage/cmd/wdt.rst
doc/usage/cmd/wget.rst
doc/usage/cmdline.rst