diff options
| author | Franz Schnyder <[email protected]> | 2026-03-31 10:10:10 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-04 11:07:43 -0600 |
| commit | 92a04aea6df3e59942614864486bbd0f46d01682 (patch) | |
| tree | 44097ed77e5ee243171693ed913a6f9d3df1d943 /api/api_platform.c | |
| parent | bb0f3eebb3c196d9b6efbbd1e5aa9b16abbb9ad6 (diff) | |
board: toradex: Quote variables in `test` cmd expression
With correct POSIX handling, unquoted empty variables can turn the
expression like
test -n ${fdtfile}
into
test -n
The POSIX handling for single argument `test` evaluates it as true,
so the fallback initialization will be skipped unexpectedly.
Quoting variable expansions in `test` expressions will always result in
correct behavior for empty and non-empty values.
This change was triggered by
commit 8b0619579b22 ("cmd: test: fix handling of single-argument form of test")
The aim is to have a less fragile codebase that is not dependent on a
quirk of the shell implementation.
Use quoted variable expansions in `test` expressions throughout.
Signed-off-by: Franz Schnyder <[email protected]>
Acked-by: Francesco Dolcini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'api/api_platform.c')
0 files changed, 0 insertions, 0 deletions
