diff options
| author | Simon Glass <[email protected]> | 2026-05-03 14:49:23 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-14 15:39:09 -0600 |
| commit | 9458e39c6595e2e00a1d0a645676eaf935e783c7 (patch) | |
| tree | 52b8bd8302dbe33e39f2423611d1801a30caf937 /include | |
| parent | 2120834c25d525b754a8473565d4e0f9c158d806 (diff) | |
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 <[email protected]>
Reviewed-by: Ćukasz Majewski <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/configs/mccmon6.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/configs/mccmon6.h b/include/configs/mccmon6.h index 9f401718bfb..0cf62d6bda8 100644 --- a/include/configs/mccmon6.h +++ b/include/configs/mccmon6.h @@ -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 " \ |
