[flashrom] [commit] r1253 - trunk

repository service svn at flashrom.org
Wed Jan 19 07:21:54 CET 2011


Author: stepan
Date: Wed Jan 19 07:21:54 2011
New Revision: 1253
URL: http://flashrom.org/trac/flashrom/changeset/1253

Log:
Don't print the local memory flash chip address on programmers that don't
actually map the flash chip into local memory (like the dediprog) because
the value does not make sense there.

This version was reworked / rewritten by Mathias Krause to have less "impact"

Signed-off-by: Stefan Reinauer <reinauer at google.com>
Acked-by: Mathias Krause <mathias.krause at secunet.com>

Modified:
   trunk/flashrom.c

Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c	Mon Jan 17 08:50:42 2011	(r1252)
+++ trunk/flashrom.c	Wed Jan 19 07:21:54 2011	(r1253)
@@ -1127,6 +1127,7 @@
 {
 	struct flashchip *flash;
 	unsigned long base = 0;
+	char location[64];
 	uint32_t size;
 	enum chipbustype buses_common;
 	char *tmp;
@@ -1178,10 +1179,16 @@
 	if (!flash || !flash->name)
 		return NULL;
 
-	msg_cinfo("%s chip \"%s %s\" (%d KB, %s) at physical address 0x%lx.\n",
+	if (programmer_table[programmer].map_flash_region == physmap) {
+		snprintf(location, sizeof(location), "at physical address 0x%lx", base);
+	} else { 
+		snprintf(location, sizeof(location), "on %s", programmer_table[programmer].name);
+	}
+
+	msg_cinfo("%s chip \"%s %s\" (%d KB, %s) %s.\n",
 	       force ? "Assuming" : "Found",
 	       flash->vendor, flash->name, flash->total_size,
-	       flashbuses_to_text(flash->bustype), base);
+	       flashbuses_to_text(flash->bustype), location);
 
 	/* Flash registers will not be mapped if the chip was forced. Lock info
 	 * may be stored in registers, so avoid lock info printing.




More information about the flashrom mailing list