]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Fixed handling of bad checksums with "mkimage -l"
authorWolfgang Denk <wd@pollux.denx.de>
Fri, 28 Apr 2006 19:24:32 +0000 (21:24 +0200)
committerWolfgang Denk <wd@pollux.denx.de>
Fri, 28 Apr 2006 19:24:32 +0000 (21:24 +0200)
CHANGELOG
tools/mkimage.c

index c479e5da5bed43f93c789201ae6b999f4274ffed..22c15dc568140cb7f2f2b9be8db84d32dcd078bd 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@
 Changes since U-Boot 1.1.4:
 ======================================================================
 
+* Fixed handling of bad checksums with "mkimage -l"
+
 * Added support for BC3450 board
   Patch by Stefan Strobl, 21. Oct 2005
 
index 5222bb21a5b038da4462f1005d4c9781907cdd7e..fea3e5bc6b3079e3d2a915829f04a83c832797fb 100644 (file)
@@ -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 */