]> git.ipfire.org Git - thirdparty/u-boot.git/commit
mccmon6: Quote recovery_status in bootcmd test
authorSimon Glass <sjg@chromium.org>
Sun, 3 May 2026 20:49:23 +0000 (14:49 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 14 May 2026 21:39:09 +0000 (15:39 -0600)
commit9458e39c6595e2e00a1d0a645676eaf935e783c7
tree52b8bd8302dbe33e39f2423611d1801a30caf937
parent2120834c25d525b754a8473565d4e0f9c158d806
mccmon6: Quote recovery_status in bootcmd test

The mccmon6 bootcmd starts with:

    if test -n ${recovery_status}; then run boot_recovery; ...

The default state is "no recovery requested", i.e. recovery_status
unset.  The expression then expands to 'test -n' with no operand and
relies on a U-Boot 'test' quirk that treats a missing operand as
false to skip recovery.

Quote the variable so an unset recovery_status expands to 'test -n ""'
and the emptiness check is explicit.

Fixes: 8b0619579b22 ("cmd: test: fix handling of single-argument form of test")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ɓukasz Majewski <lukma@nabladev.com>
include/configs/mccmon6.h