[coreboot] r3348 - trunk/util/flashrom

svn at coreboot.org svn at coreboot.org
Fri May 23 00:47:05 CEST 2008


Author: uwe
Date: 2008-05-23 00:47:04 +0200 (Fri, 23 May 2008)
New Revision: 3348

Modified:
   trunk/util/flashrom/board_enable.c
   trunk/util/flashrom/chipset_enable.c
   trunk/util/flashrom/flashrom.c
Log:
A bunch of cosmetic improvements (trivial).

 - Fix typos and inconsistencies.
 - Drop duplicate line which tells us the chip name twice.
 - Also print the chip vendor, not only the name.

Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>



Modified: trunk/util/flashrom/board_enable.c
===================================================================
--- trunk/util/flashrom/board_enable.c	2008-05-22 21:26:42 UTC (rev 3347)
+++ trunk/util/flashrom/board_enable.c	2008-05-22 22:47:04 UTC (rev 3348)
@@ -701,7 +701,7 @@
 		board = board_match_pci_card_ids();
 
 	if (board) {
-		printf("Found board \"%s\": enabling flash write... ",
+		printf("Found board \"%s\", enabling flash write... ",
 			board->name);
 
 		ret = board->enable(board->name);

Modified: trunk/util/flashrom/chipset_enable.c
===================================================================
--- trunk/util/flashrom/chipset_enable.c	2008-05-22 21:26:42 UTC (rev 3347)
+++ trunk/util/flashrom/chipset_enable.c	2008-05-22 22:47:04 UTC (rev 3348)
@@ -154,7 +154,7 @@
 	 */
 	old = pci_read_byte(dev, bios_cntl);
 
-	printf_debug("BIOS Lock Enable: %sabled, ",
+	printf_debug("\nBIOS Lock Enable: %sabled, ",
 		     (old & (1 << 1)) ? "en" : "dis");
 	printf_debug("BIOS Write Enable: %sabled, ",
 		     (old & (1 << 0)) ? "en" : "dis");

Modified: trunk/util/flashrom/flashrom.c
===================================================================
--- trunk/util/flashrom/flashrom.c	2008-05-22 21:26:42 UTC (rev 3347)
+++ trunk/util/flashrom/flashrom.c	2008-05-22 22:47:04 UTC (rev 3348)
@@ -151,8 +151,9 @@
 		flash->virtual_memory = bios;
 
 		if (flash->probe(flash) == 1) {
-			printf("%s found at physical address 0x%lx.\n",
-			       flash->name, flash_baseaddr);
+			printf("Found chip \"%s %s\" (%d KB) at physical address 0x%lx.\n",
+			       flash->vendor, flash->name, flash->total_size,
+			       flash_baseaddr);
 			return flash;
 		}
 		munmap((void *)bios, size);
@@ -360,7 +361,7 @@
 	}
 
 	if (read_it && write_it) {
-		printf("-r and -w are mutually exclusive\n");
+		printf("Error: -r and -w are mutually exclusive.\n");
 		usage(argv[0]);
 	}
 
@@ -432,7 +433,6 @@
 
 	flash = flashes[0];
 
-	printf("Flash part is %s (%d KB).\n", flash->name, flash->total_size);
 	if (TEST_OK_MASK != (flash->tested & TEST_OK_MASK)) {
 		printf("===\n");
 		if (flash->tested & TEST_BAD_MASK) {
@@ -480,7 +480,7 @@
 	buf = (uint8_t *) calloc(size, sizeof(char));
 
 	if (erase_it) {
-		printf("Erasing flash chip\n");
+		printf("Erasing flash chip.\n");
 		if (!flash->erase) {
 			fprintf(stderr, "Error: flashrom has no erase function for this flash chip.\n");
 			return 1;
@@ -517,7 +517,7 @@
 			exit(1);
 		}
 		if (image_stat.st_size != flash->total_size * 1024) {
-			fprintf(stderr, "Error: Image size doesnt match\n");
+			fprintf(stderr, "Error: Image size doesn't match\n");
 			exit(1);
 		}
 





More information about the coreboot mailing list