flash_ec: Support image name with spaces
BRANCH=none
TEST=Flashed a zork ec image with a space in the name
@@ -886,7 +886,7 @@ function flash_flashrom() {
if [[ "${CHIP}" =~ ^npcx(|_int)_spi$ ]] ; then
{ # Patch temp image up to SPI_SIZE
- cat $IMG
+ cat "$IMG"
if [[ ${IMG_SIZE} -lt ${SPI_SIZE} ]] ; then
dd if=/dev/zero bs=${PATCH_SIZE} count=1 | \
tr '\0' '\377'
@@ -898,7 +898,7 @@ function flash_flashrom() {
dd if=/dev/zero bs=${PATCH_SIZE} count=1 | \
tr '\0' '\377'
fi
- cat $IMG
+ cat "$IMG"
} > $T
fi
