summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2009-06-18 14:04:44 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2009-06-18 14:04:44 +0000
commite1aa75ec952be70aa9b6c52e2aba7100539f18fe (patch)
tree7efdca5502ebe71a376c4b97ac743ab1a2a2a9d2 /print.c
parente6abef0f641abae000c4590827ce7ef4691b6fa7 (diff)
downloadast2050-flashrom-e1aa75ec952be70aa9b6c52e2aba7100539f18fe.zip
ast2050-flashrom-e1aa75ec952be70aa9b6c52e2aba7100539f18fe.tar.gz
Also print the supported/nonsupported laptops in -L output
Content taken from current wiki page. Corresponding to flashrom svn r604. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'print.c')
-rw-r--r--print.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/print.c b/print.c
index 89a7602..235c725 100644
--- a/print.c
+++ b/print.c
@@ -167,13 +167,15 @@ void print_supported_chipsets(void)
}
}
-void print_supported_boards_helper(const struct board_info *b)
+void print_supported_boards_helper(const struct board_info *b, const char *msg)
{
int i, j, boardcount = 0;
for (i = 0; b[i].vendor != NULL; i++)
boardcount++;
+ printf("\n%s (total: %d):\n\n", msg, boardcount);
+
for (i = 0; b[i].vendor != NULL; i++) {
printf("%s", b[i].vendor);
for (j = 0; j < 25 - strlen(b[i].vendor); j++)
@@ -210,15 +212,12 @@ void print_supported_boards(void)
printf("(none, board is autodetected)\n");
}
- for (i = 0, boardcount = 0; boards_ok[i].vendor != NULL; i++)
- boardcount++;
- printf("\nSupported boards which don't need write-enable code "
- "(total: %d):\n\n", boardcount);
- print_supported_boards_helper(boards_ok);
-
- for (i = 0, boardcount = 0; boards_bad[i].vendor != NULL; i++)
- boardcount++;
- printf("\nBoards which have been verified to NOT work yet "
- "(total: %d):\n\n", boardcount);
- print_supported_boards_helper(boards_bad);
+ print_supported_boards_helper(boards_ok,
+ "Supported boards which don't need write-enable code");
+ print_supported_boards_helper(boards_bad,
+ "Boards which have been verified to NOT work yet");
+ print_supported_boards_helper(laptops_ok,
+ "Laptops which have been verified to work");
+ print_supported_boards_helper(laptops_bad,
+ "Laptops which have been verified to NOT work yet");
}
OpenPOWER on IntegriCloud