diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2009-06-16 23:15:10 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2009-06-16 23:15:10 +0000 |
commit | 4e587905aeaf544c94e96f508a1b2e1294b31b0d (patch) | |
tree | 38cd9478fed5aea68858223a7e964754b5c19f0e /board_enable.c | |
parent | 05dfbe67d661d9637a0aa9091a0cb9581b39284a (diff) | |
download | ast2050-flashrom-4e587905aeaf544c94e96f508a1b2e1294b31b0d.zip ast2050-flashrom-4e587905aeaf544c94e96f508a1b2e1294b31b0d.tar.gz |
List the size (in KB) and type of supported flash chips in 'flashrom -L'
Also, list how many chips/chipsets/boards we support in 'flashrom -L'.
Corresponding to flashrom svn r599.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'board_enable.c')
-rw-r--r-- | board_enable.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/board_enable.c b/board_enable.c index 6922afa..377524e 100644 --- a/board_enable.c +++ b/board_enable.c @@ -829,7 +829,10 @@ const struct board_info boards_bad[] = { void print_supported_boards_helper(const struct board_info *b) { - int i, j; + int i, j, boardcount = 0; + + for (i = 0; b[i].vendor != NULL; i++) + boardcount++; for (i = 0; b[i].vendor != NULL; i++) { printf("%s", b[i].vendor); @@ -844,11 +847,15 @@ void print_supported_boards_helper(const struct board_info *b) void print_supported_boards(void) { - int i, j; + int i, j, boardcount = 0; struct board_pciid_enable *b = board_pciid_enables; - printf("\nSupported boards which need write-enable code:\n\nVendor: " - " Board: Required option:\n\n"); + for (i = 0; b[i].vendor_name != NULL; i++) + boardcount++; + + printf("\nSupported boards which need write-enable code (total: %d):" + "\n\nVendor: Board: " + "Required option:\n\n", boardcount); for (i = 0; b[i].vendor_name != NULL; i++) { printf("%s", b[i].vendor_name); @@ -863,10 +870,16 @@ void print_supported_boards(void) printf("(none, board is autodetected)\n"); } - printf("\nSupported boards which don't need write-enable code:\n\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); - printf("\nBoards which have been verified to NOT work (yet):\n\n"); + 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); } |