diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-02-03 22:32:09 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-02-03 22:32:09 +0000 |
commit | 035492a86cd50efd8a641f7246540cd067f4aed2 (patch) | |
tree | 39005ec261af18bd8594fa5782f7e805a40d9e6f /print.c | |
parent | 8a0f9b07cf0c58dd7fd23e2f5c956aa3145e0aa3 (diff) | |
download | flashrom-035492a86cd50efd8a641f7246540cd067f4aed2.tar.gz flashrom-035492a86cd50efd8a641f7246540cd067f4aed2.tar.bz2 flashrom-035492a86cd50efd8a641f7246540cd067f4aed2.zip |
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.
Corresponding to flashrom svn r1488.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -74,8 +74,10 @@ static void print_supported_chips(void) /* calculate maximum column widths and by iterating over all chips */ for (f = flashchips; f->name != NULL; f++) { - /* Ignore "unknown XXXX SPI chip" entries. */ - if (!strncmp(f->name, "unknown", 7)) + /* Ignore generic entries. */ + if (!strncmp(f->vendor, "Unknown", 7) || + !strncmp(f->vendor, "Programmer", 10) || + !strncmp(f->name, "unknown", 7)) continue; chipcount++; @@ -161,8 +163,10 @@ static void print_supported_chips(void) msg_ginfo("(P = PROBE, R = READ, E = ERASE, W = WRITE)\n\n"); for (f = flashchips; f->name != NULL; f++) { - /* 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; /* support for multiline vendor names: |