diff mbox series

[1/1] tools: imx8m_image: fix warning message

Message ID 20200121105842.23965-1-sebastien.szymanski@armadeus.com
State Accepted
Commit 4cfeb8df31d40ff1120ea9932644ec91fb3af02b
Headers show
Series [1/1] tools: imx8m_image: fix warning message | expand

Commit Message

Sébastien Szymanski Jan. 21, 2020, 10:58 a.m. UTC
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.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski at armadeus.com>
---
 tools/imx8m_image.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Frieder Schrempf Jan. 21, 2020, 11:17 a.m. UTC | #1
On 21.01.20 11:58, Sébastien Szymanski wrote:
> 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.
> 
> Signed-off-by: Sébastien Szymanski <sebastien.szymanski at armadeus.com>

Thanks for fixing my previous patch.

Fixes: 162c72c80445 ("tools: imx8m_image: Change source path for DDR 
firmware to build dir")

Reviewed-by: Frieder Schrempf <frieder.schrempf at kontron.de>

> ---
>   tools/imx8m_image.sh | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh
> index 4959f9c835..ba60104443 100755
> --- a/tools/imx8m_image.sh
> +++ b/tools/imx8m_image.sh
> @@ -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
>
diff mbox series

Patch

diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh
index 4959f9c835..ba60104443 100755
--- a/tools/imx8m_image.sh
+++ b/tools/imx8m_image.sh
@@ -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