[flashrom] [PATCH] fix counting of supported chips in the wiki output

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Tue Jul 26 03:12:03 CEST 2011


where should i put this one?
1. commit it on its own
2. tested stuff patch, or
3. patch touching print_wiki.c in the voltage printing branch

Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
---
 print_wiki.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/print_wiki.c b/print_wiki.c
index 6280aff..b70da86 100644
--- a/print_wiki.c
+++ b/print_wiki.c
@@ -205,8 +205,12 @@ static void print_supported_chips_wiki(int cols)
 	uint32_t t;
 	char *s;
 
-	for (f = flashchips; f->name != NULL; f++)
+	for (f = flashchips; f->name != NULL; f++) {
+		/* Don't count "unknown XXXX SPI chip" entries. */
+		if (!strncmp(f->name, "unknown", 7))
+			continue;
 		chipcount++;
+	}
 
 	printf("\n== Supported chips ==\n\nTotal amount of supported "
 	       "chips: '''%d'''\n\n{| border=\"0\" valign=\"top\"\n"
-- 
1.7.1





More information about the flashrom mailing list