Changeset 1488


Ignore:
Timestamp:
02/03/12 23:32:09 (4 months ago)
Author:
stefanct
Message:

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@…>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/print.c

    r1487 r1488  
    7575        /* calculate maximum column widths and by iterating over all chips */ 
    7676        for (f = flashchips; f->name != NULL; f++) { 
    77                 /* Ignore "unknown XXXX SPI chip" entries. */ 
    78                 if (!strncmp(f->name, "unknown", 7)) 
     77                /* Ignore generic entries. */ 
     78                if (!strncmp(f->vendor, "Unknown", 7) || 
     79                    !strncmp(f->vendor, "Programmer", 10) || 
     80                    !strncmp(f->name, "unknown", 7)) 
    7981                        continue; 
    8082                chipcount++; 
     
    162164 
    163165        for (f = flashchips; f->name != NULL; f++) { 
    164                 /* Don't print "unknown XXXX SPI chip" entries. */ 
    165                 if (!strncmp(f->name, "unknown", 7)) 
     166                /* Don't print generic entries. */ 
     167                if (!strncmp(f->vendor, "Unknown", 7) || 
     168                    !strncmp(f->vendor, "Programmer", 10) || 
     169                    !strncmp(f->name, "unknown", 7)) 
    166170                        continue; 
    167171 
  • trunk/print_wiki.c

    r1483 r1488  
    217217 
    218218        for (f = flashchips; f->name != NULL; f++) { 
    219                 /* Don't count "unknown XXXX SPI chip" entries. */ 
    220                 if (!strncmp(f->name, "unknown", 7)) 
    221                         continue; 
     219                /* Don't count generic entries. */ 
     220                if (!strncmp(f->vendor, "Unknown", 7) || 
     221                    !strncmp(f->vendor, "Programmer", 10) || 
     222                    !strncmp(f->name, "unknown", 7)) 
    222223                chipcount++; 
    223224        } 
     
    228229 
    229230        for (f = flashchips; f->name != NULL; f++, i++) { 
    230                 /* Don't print "unknown XXXX SPI chip" entries. */ 
    231                 if (!strncmp(f->name, "unknown", 7)) 
     231                /* Don't print generic entries. */ 
     232                if (!strncmp(f->vendor, "Unknown", 7) || 
     233                    !strncmp(f->vendor, "Programmer", 10) || 
     234                    !strncmp(f->name, "unknown", 7)) 
    232235                        continue; 
    233236 
Note: See TracChangeset for help on using the changeset viewer.