Author: uwe
Date: 2009-07-04 01:51:19 +0200 (Sat, 04 Jul 2009)
New Revision: 640
Modified:
trunk/print.c
Log:
Some flashrom printing changes:
- Also print URLs of boards with board-enables.
- Mark known-bad operations for chips red in the wiki.
- Clarifiy a wiki message a bit.
Signed-off-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Acked-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Modified: trunk/print.c
===================================================================
--- trunk/print.c 2009-07-03 17:12:05 UTC (rev 639)
+++ trunk/print.c 2009-07-03 23:51:19 UTC (rev 640)
@@ -239,7 +239,7 @@
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
background-color:#eeeeee; align:right; border:1px solid #aabbcc;\"><small>\n\
Please do '''not''' edit these tables in the wiki directly, they are \
-semi-automatically generated by pasting '''flashrom -z''' output.<br />\
+generated by pasting '''flashrom -z''' output.<br />\
'''Last update:''' %s(generated by flashrom %s)\n</small></div>\n";
const char *chipset_th = "{| border=\"0\" style=\"font-size: smaller\"\n\
@@ -596,8 +596,9 @@
static void wiki_helper2(const char *heading, int cols)
{
- int i, j, boardcount = 0, color = 1;
+ int i, j, k, boardcount = 0, color = 1;
struct board_pciid_enable *b;
+ const struct board_info_url *u = boards_url;
for (b = board_pciid_enables; b->vendor_name != NULL; b++)
boardcount++;
@@ -612,9 +613,13 @@
if (i > 0 && strcmp(b[i].vendor_name, b[i - 1].vendor_name))
color = !color;
- printf("|- bgcolor=\"#%s\" valign=\"top\"\n| %s || %s || "
- "%s%s%s%s || {{OK}}\n", (color) ? "eeeeee" : "dddddd",
- b[i].vendor_name, b[i].board_name,
+ k = url(b[i].vendor_name, b[i].board_name);
+
+ printf("|- bgcolor=\"#%s\" valign=\"top\"\n| %s || %s%s %s%s "
+ "|| %s%s%s%s || {{OK}}\n", (color) ? "eeeeee" : "dddddd",
+ b[i].vendor_name, (k != -1 && u[k].url) ? "[" : "",
+ (k != -1 && u[k].url) ? u[k].url : "", b[i].board_name,
+ (k != -1 && u[k].url) ? "]" : "",
(b[i].lb_vendor) ? "-m " : "—",
(b[i].lb_vendor) ? b[i].lb_vendor : "",
(b[i].lb_vendor) ? ":" : "",
@@ -646,6 +651,7 @@
{
int i = 0, c = 1, chipcount = 0;
struct flashchip *f, *old = NULL;
+ uint32_t t;
for (f = flashchips; f->name != NULL; f++)
chipcount++;
@@ -663,14 +669,19 @@
if (old != NULL && strcmp(old->vendor, f->vendor))
c = !c;
+ t = f->tested;
printf("|- bgcolor=\"#%s\" valign=\"top\"\n| %s || %s || %d "
"|| %s || {{%s}} || {{%s}} || {{%s}} || {{%s}}\n",
(c == 1) ? "eeeeee" : "dddddd", f->vendor, f->name,
f->total_size, flashbuses_to_text(f->bustype),
- ((f->tested & TEST_OK_PROBE) ? "OK" : (c) ? "?2" : "?"),
- ((f->tested & TEST_OK_READ) ? "OK" : (c) ? "?2" : "?"),
- ((f->tested & TEST_OK_ERASE) ? "OK" : (c) ? "?2" : "?"),
- ((f->tested & TEST_OK_WRITE) ? "OK" : (c) ? "?2" : "?"));
+ (t & TEST_OK_PROBE) ? "OK" :
+ (t & TEST_BAD_PROBE) ? "No" : ((c) ? "?2" : "?"),
+ (t & TEST_OK_READ) ? "OK" :
+ (t & TEST_BAD_READ) ? "No" : ((c) ? "?2" : "?"),
+ (t & TEST_OK_ERASE) ? "OK" :
+ (t & TEST_BAD_ERASE) ? "No" : ((c) ? "?2" : "?"),
+ (t & TEST_OK_WRITE) ? "OK" :
+ (t & TEST_BAD_WRITE) ? "No" : ((c) ? "?2" : "?"));
/* Split table into three columns. */
if (i >= (chipcount / 3 + 1)) {