flashrom: Always print address when verification fails, not only with -V.
authorPeter Stuge <peter@stuge.se>
Tue, 13 Jan 2009 14:32:27 +0000 (14:32 +0000)
committerPeter Stuge <peter@stuge.se>
Tue, 13 Jan 2009 14:32:27 +0000 (14:32 +0000)
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3860 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

util/flashrom/flashrom.c

index 9c8db6e6bd90ece7c3be6cc8075fdd9b1ebd37b2..f613f8a0712ee2377e4a512af2bd74761f5c2a7c 100644 (file)
@@ -186,10 +186,11 @@ int verify_flash(struct flashchip *flash, uint8_t *buf)
                        printf("0x%08x", idx);
 
                if (*(buf2 + idx) != *(buf + idx)) {
-                       if (verbose) {
-                               printf("0x%08x ", idx);
-                       }
-                       printf("FAILED!  Expected=0x%02x, Read=0x%02x\n",
+                       if (verbose)
+                               printf("0x%08x FAILED!", idx);
+                       else
+                               printf("FAILED at 0x%08x!", idx);
+                       printf("  Expected=0x%02x, Read=0x%02x\n",
                               *(buf + idx), *(buf2 + idx));
                        return 1;
                }