From 7c5f4b9021be26ff63fed71bae466104b00fde2f Mon Sep 17 00:00:00 2001 From: Craig Hesling Date: Thu, 6 Oct 2022 21:35:35 -0400 Subject: util: Change flash_ec file check to exists check This allows passing a pipe file as the image, which could be used to invoke flash_ec thorough ssh and a pipe for the image file. BRANCH=none BUG=b:176500425 TEST=ssh DUT -- flash_ec --board=bloonchipper "--image=<(cat)" <.../ec.bin Signed-off-by: Craig Hesling Change-Id: I509037626e8c7299613ebdaf5391edfa0cf6a6fa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3937047 Reviewed-by: Daisuke Nojiri --- util/flash_ec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/flash_ec b/util/flash_ec index 9c13e045f1..8419c2e7a0 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -731,7 +731,7 @@ fi function ec_image() { # No image specified on the command line, try default ones if [[ -n "${FLAGS_image}" ]] ; then - if [ -f "${FLAGS_image}" ] || \ + if [ -e "${FLAGS_image}" ] || \ [ "${FLAGS_image}" == "-" ]; then echo "${FLAGS_image}" return -- cgit v1.2.1