summaryrefslogtreecommitdiff
path: root/tools/mkimage.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-04-28 21:24:32 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-04-28 21:24:32 +0200
commit3577d3a33b8446c4cc4b7afdb44f9879b53ca293 (patch)
tree01a191904845b42ab02e34fe1ccf5bc8c112ea00 /tools/mkimage.c
parent76544f80e476a7a0cc3a0bbce853354f2c6a61e2 (diff)
downloadu-boot-imx-3577d3a33b8446c4cc4b7afdb44f9879b53ca293.zip
u-boot-imx-3577d3a33b8446c4cc4b7afdb44f9879b53ca293.tar.gz
u-boot-imx-3577d3a33b8446c4cc4b7afdb44f9879b53ca293.tar.bz2
Fixed handling of bad checksums with "mkimage -l"
Diffstat (limited to 'tools/mkimage.c')
-rw-r--r--tools/mkimage.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 5222bb2..fea3e5b 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -277,7 +277,8 @@ NXTARG: ;
*/
if (xflag) {
if (ep != addr + sizeof(image_header_t)) {
- fprintf (stderr, "%s: For XIP, the entry point must be the load addr + %lu\n",
+ fprintf (stderr,
+ "%s: For XIP, the entry point must be the load addr + %lu\n",
cmdname,
(unsigned long)sizeof(image_header_t));
exit (EXIT_FAILURE);
@@ -347,8 +348,9 @@ NXTARG: ;
if (crc32 (0, data, len) != checksum) {
fprintf (stderr,
- "*** Warning: \"%s\" has bad header checksum!\n",
- imagefile);
+ "%s: ERROR: \"%s\" has bad header checksum!\n",
+ cmdname, imagefile);
+ exit (EXIT_FAILURE);
}
data = (char *)(ptr + sizeof(image_header_t));
@@ -356,8 +358,9 @@ NXTARG: ;
if (crc32 (0, data, len) != ntohl(hdr->ih_dcrc)) {
fprintf (stderr,
- "*** Warning: \"%s\" has corrupted data!\n",
- imagefile);
+ "%s: ERROR: \"%s\" has corrupted data!\n",
+ cmdname, imagefile);
+ exit (EXIT_FAILURE);
}
/* for multi-file images we need the data part, too */