mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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: 8b0619579b ("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>
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
"bootm $loadaddr};reset;" \
|
||||
"fi\0" \
|
||||
"bootcmd=" \
|
||||
"if test -n ${recovery_status}; then " \
|
||||
"if test -n \"${recovery_status}\"; then " \
|
||||
"run boot_recovery;" \
|
||||
"else " \
|
||||
"if test ! -n ${boot_medium}; then " \
|
||||
|
||||
Reference in New Issue
Block a user