From: Pali Rohár <pali@kernel.org>
Date: Sun, 29 Jan 2023 16:45:54 +0000 (+0100)
Subject: tools: imagetool: Show error message when detecting image type failed
X-Git-Tag: v2025.01-rc5-pxa1908~1118^2~6
X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=6c58aa1e6167ab71d4d4121cd79372bf25d1792a;p=u-boot.git

tools: imagetool: Show error message when detecting image type failed

Signed-off-by: Pali Rohár <pali@kernel.org>
---

diff --git a/tools/imagetool.c b/tools/imagetool.c
index 688169b3a8..e1021f44f5 100644
--- a/tools/imagetool.c
+++ b/tools/imagetool.c
@@ -71,6 +71,11 @@ int imagetool_verify_print_header(
 		}
 	}
 
+	if (retval != 0) {
+		fprintf(stderr, "%s: cannot detect image type\n",
+			params->cmdname);
+	}
+
 	return retval;
 }