summaryrefslogtreecommitdiff
path: root/print_wiki.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-07-28 19:35:26 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-07-28 19:35:26 +0000
commit590e09c8850b11daf4de2a5e3a90527550d8061d (patch)
treee8398b3d451612b394f50cc373590dcccee44aa6 /print_wiki.c
parentcc72f663f4f59e41efc96e6a50e3c4266f39be5b (diff)
downloadflashrom-590e09c8850b11daf4de2a5e3a90527550d8061d.tar.gz
Introduce enum test_state.
Previously boards in the wiki were tagged either as working or as known bad. But we added support to various boards via board enables that were then never tested because the owners have not reported back. This can now be tagged with NT and is shown appropriately. Also, the underlying data structure indicating state was converted from macros to an enum while preserving original integer values and is used for programmers and chipsets too. Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1555 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'print_wiki.c')
-rw-r--r--print_wiki.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/print_wiki.c b/print_wiki.c
index 377154d..68a69a9 100644
--- a/print_wiki.c
+++ b/print_wiki.c
@@ -129,23 +129,27 @@ static void print_supported_chipsets_wiki(int cols)
static void wiki_helper(const char *devicetype, int cols,
const struct board_info boards[])
{
- int i, j, k = 0, boardcount_good = 0, boardcount_bad = 0, color = 1;
- int num_notes = 0;
+ int i, j, k;
+ unsigned int boardcount_good = 0, boardcount_bad = 0, boardcount_nt = 0;
+ int num_notes = 0, color = 1;
char *notes = calloc(1, 1);
char tmp[900 + 1];
const struct board_match *b = board_matches;
for (i = 0; boards[i].vendor != NULL; i++) {
- if (boards[i].working)
+ if (boards[i].working == OK)
boardcount_good++;
+ else if (boards[i].working == NT)
+ boardcount_nt++;
else
boardcount_bad++;
}
- printf("\n\nTotal amount of supported %s: '''%d'''. "
- "Not yet supported (i.e., known-bad): '''%d'''.\n\n"
+ printf("\n\nTotal amount of known good boards %s: '''%d'''; "
+ "Untested (e.g. user vanished before testing new code): '''%d'''; "
+ "Not yet supported (i.e. known-bad): '''%d'''.\n\n"
"{| border=\"0\" valign=\"top\"\n| valign=\"top\"|\n\n%s",
- devicetype, boardcount_good, boardcount_bad, board_th);
+ devicetype, boardcount_good, boardcount_nt, boardcount_bad, board_th);
for (i = 0, j = 0; boards[i].vendor != NULL; i++, j++) {
@@ -171,7 +175,8 @@ static void wiki_helper(const char *devicetype, int cols,
b[k].lb_vendor ? b[k].lb_vendor : "",
b[k].lb_vendor ? ":" : "",
b[k].lb_vendor ? b[k].lb_part : "",
- (boards[i].working) ? "OK" : "No");
+ (boards[i].working == OK) ? "OK" :
+ (boards[i].working == NT) ? "?3" : "No");
if (boards[i].note) {
printf("<sup>%d</sup>\n", num_notes + 1);