summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'print.c')
-rw-r--r--print.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/print.c b/print.c
index bfe5ab8..edcefa9 100644
--- a/print.c
+++ b/print.c
@@ -239,7 +239,7 @@ const char *wiki_header = "= Supported devices =\n\n\
<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_helper(const char *heading, const char *status,
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 @@ static void wiki_helper2(const char *heading, int cols)
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 " : "&mdash;",
(b[i].lb_vendor) ? b[i].lb_vendor : "",
(b[i].lb_vendor) ? ":" : "",
@@ -646,6 +651,7 @@ void print_supported_chips_wiki(void)
{
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 @@ void print_supported_chips_wiki(void)
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)) {
OpenPOWER on IntegriCloud