diff options
author | uwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-07-03 23:51:19 +0000 |
---|---|---|
committer | uwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-07-03 23:51:19 +0000 |
commit | 439635e60b7bcbfa62e42ff7d168b2e6f3fc6887 (patch) | |
tree | d3cf9ab5a663ec980e03dcd7df2c0a2b56fe2530 | |
parent | 609ca2c081edfd8bd5f09aea34cedc7645f62fe3 (diff) | |
download | flashrom-439635e60b7bcbfa62e42ff7d168b2e6f3fc6887.tar.gz |
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@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@640 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | print.c | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -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 " : "—", (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)) { |