Skip to contentSkip to conversation

tools: imx8m_image: fix warning message

PATCH New Sébastien Szymanski 3 participants 3 messages Jan 21, 2020 – Feb 10, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: imx8m_image: fix warning message

When a firmware file is missing the warning message doesn't indicate the firmware file name because '$tmp' var doesn't exist.
Fix the warning message and while at it reduce the if/else statement.

---
 tools/imx8m_image.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
tools/imx8m_image.sh +2 -4
index 4959f9c835..ba60104443 100755
@@ -14,10 +14,8 @@ for f in $blobs; do
 		continue
 	fi
 
-	if [ -f $f ]; then
-		continue
-	else
-		echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2
+	if [ ! -f $f ]; then
+		echo "WARNING '$f' not found, resulting binary is not-functional" >&2
 		exit 1
 	fi
 done
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 tools: imx8m_image: fix warning message

Quoted 5 lines · Sébastien Szymanski

When a firmware file is missing the warning message doesn't indicate the firmware file name because '$tmp' var doesn't exist.
Fix the warning message and while at it reduce the if/else statement.

Thanks for fixing my previous patch.

Fixes 162c72c80445 ("tools: imx8m_image: Change source path for DDR

firmware to build dir")

Quoted 22 lines
---
  tools/imx8m_image.sh | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
tools/imx8m_image.sh +2 -4
index 4959f9c835..ba60104443 100755
@@ -14,10 +14,8 @@ for f in $blobs; do
  		continue
  	fi
 
-	if [ -f $f ]; then
-		continue
-	else
-		echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2
+	if [ ! -f $f ]; then
+		echo "WARNING '$f' not found, resulting binary is not-functional" >&2
  		exit 1
  	fi
  done
#2 lore raw

PATCH 1/1 tools: imx8m_image: fix warning message

In reply to Sébastien Szymanski
Quoted 5 lines

When a firmware file is missing the warning message doesn't indicate the firmware file name because '$tmp' var doesn't exist.
Fix the warning message and while at it reduce the if/else statement.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================