summaryrefslogtreecommitdiff
path: root/print_wiki.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-02-03 22:32:09 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-02-03 22:32:09 +0000
commit081482409bbff3f1d656268c0d00a38e169dca19 (patch)
tree39005ec261af18bd8594fa5782f7e805a40d9e6f /print_wiki.c
parentc89834953448f43fe3d036c75b8381a543ff9584 (diff)
downloadflashrom-081482409bbff3f1d656268c0d00a38e169dca19.tar.gz
print*.c: Refine the do not count nor print generic flash chip entries conditions.
Previously only the generic "unknown XXXX SPI chips" were ignored (because their name started with "unknown". This patch adds also all chips whose vendor starts with "Unknown" (none so far) and "Programmer" (currently used by the opaque flash chip framework) . A patch will add the SFDP chip template with an "Unknown" vendor field later. Rationale: these entries do not contain any useful information when shown in -L or wiki output. It would be better to add them to a general feature section or similar. Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1488 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'print_wiki.c')
-rw-r--r--print_wiki.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/print_wiki.c b/print_wiki.c
index 1c9241e..0213c74 100644
--- a/print_wiki.c
+++ b/print_wiki.c
@@ -216,9 +216,10 @@ static void print_supported_chips_wiki(int cols)
char vmin[6];
for (f = flashchips; f->name != NULL; f++) {
- /* Don't count "unknown XXXX SPI chip" entries. */
- if (!strncmp(f->name, "unknown", 7))
- continue;
+ /* Don't count generic entries. */
+ if (!strncmp(f->vendor, "Unknown", 7) ||
+ !strncmp(f->vendor, "Programmer", 10) ||
+ !strncmp(f->name, "unknown", 7))
chipcount++;
}
@@ -227,8 +228,10 @@ static void print_supported_chips_wiki(int cols)
"| valign=\"top\"|\n\n%s", chipcount, chip_th);
for (f = flashchips; f->name != NULL; f++, i++) {
- /* Don't print "unknown XXXX SPI chip" entries. */
- if (!strncmp(f->name, "unknown", 7))
+ /* Don't print generic entries. */
+ if (!strncmp(f->vendor, "Unknown", 7) ||
+ !strncmp(f->vendor, "Programmer", 10) ||
+ !strncmp(f->name, "unknown", 7))
continue;
/* Alternate colors if the vendor changes. */