summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2022-08-26 10:35:13 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-27 00:05:28 +0000
commitc59cae82ecceeb3b37dca44fbe85aefeb84d9d8b (patch)
tree1c669043256b555c375b59a2558acaf5a39c7e60 /util
parent76099d7ba8f4df0722dcd8ef074bbf14f08fe155 (diff)
downloadchrome-ec-c59cae82ecceeb3b37dca44fbe85aefeb84d9d8b.tar.gz
util/flash_ec: Fix shellcheck warnings
error "${FUNCNAME[0]} failed: more than one argument: $@" ^-- SC2145: Argument mixes string and array. Use * or separate argument. BRANCH=none BUG=b:242127759 TEST=./util/flash_ec --board=dartmonkey Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ib4792a13dd5d4b548367bb69ca294ac07e2ad27e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860070 Reviewed-by: Andrea Grandi <agrandi@google.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/flash_ec6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/flash_ec b/util/flash_ec
index ad306187fd..b1e4ca00c4 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -244,7 +244,7 @@ function dut_control_or_die {
function dut_control_get() {
if [ $# -gt 1 ]; then
- error "${FUNCNAME[0]} failed: more than one argument: $@"
+ error "${FUNCNAME[0]} failed: more than one argument: $*"
return 1
fi
@@ -348,7 +348,7 @@ elif [ -n "${FLAGS_chip}" ]; then
if in_array "${SUPPORTED_CHIPS[@]}" "${FLAGS_chip}"; then
CHIP="${FLAGS_chip}"
else
- die "board ${BOARD} only supports (${SUPPORTED_CHIPS[@]})," \
+ die "board ${BOARD} only supports (${SUPPORTED_CHIPS[*]})," \
"not ${FLAGS_chip}."
fi
else
@@ -356,7 +356,7 @@ else
# file, instead of having multiple board-to-chip mapping info in this
# script. Please refer to crrev.com/c/1496460 for example.
die "board ${BOARD} supports multiple chips" \
- "(${FILTERED_CHIPS[@]}). Use --chip= to choose one."
+ "(${FILTERED_CHIPS[*]}). Use --chip= to choose one."
fi
if [ -n "${FLAGS_chip}" ] && [ "${CHIP}" != "${FLAGS_chip}" ]; then