Reason to patch: %06x isn't enough to show 32-bit address.

Patched files
-------------
flashrom.c
+ changed in address print %06x to %08x for support of 32MB+ chips


Signed-off-by: Boris Baykov <[email protected]>, Russia, Jan 2014
---
diff -U 5 -N ./flashrom/flashrom.c ./flashrom-1868-4ba-A/flashrom.c
--- ./flashrom/flashrom.c       2015-01-11 01:55:16.000000000 +0300
+++ ./flashrom-1868-4ba-A/flashrom.c    2015-01-10 18:48:45.000000000 +0300
@@ -1366,12 +1366,12 @@
                                  "non-empty erase function. Not an error.\n");
                if (!done)
                        continue;
                if (done != chip->total_size * 1024) {
                        msg_gerr("ERROR: Flash chip %s erase function %i "
-                               "region walking resulted in 0x%06x bytes total,"
-                               " expected 0x%06x bytes. Please report a bug at"
+                               "region walking resulted in 0x%08x bytes total,"
+                               " expected 0x%08x bytes. Please report a bug at"
                                " [email protected]\n", chip->name, k,
                                done, chip->total_size * 1024);
                        ret = 1;
                }
                if (!eraser.block_erase)
@@ -1481,11 +1481,11 @@
                len = eraser.eraseblocks[i].size;
                for (j = 0; j < eraser.eraseblocks[i].count; j++) {
                        /* Print this for every block except the first one. */
                        if (i || j)
                                msg_cdbg(", ");
-                       msg_cdbg("0x%06x-0x%06x", start,
+                       msg_cdbg("0x%08x-0x%08x", start,
                                     start + len - 1);
                        if (do_something(flash, start, len, param1, param2,
                                         eraser.block_erase)) {
                                return 1;
                        }

Attachment: flashrom-r1868-4ba-part-10.patch.tar.bz2
Description: Binary data

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to