[flashrom] [PATCH 10/10] 4BA: Some small visual changes for 4-byte addresses

Boris Baykov dev at borisbaykov.com
Sun Jan 11 00:20:18 CET 2015


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 <dev at borisbaykov.com>, 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"
                                " flashrom at flashrom.org\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;
                        }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flashrom-r1868-4ba-part-10.patch.tar.bz2
Type: application/octet-stream
Size: 967 bytes
Desc: not available
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20150111/3a24836f/attachment.obj>


More information about the flashrom mailing list