summaryrefslogtreecommitdiffstats
path: root/chipset_enable.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2009-05-22 11:37:27 +0000
committerPatrick Georgi <pgeorgi@google.com>2009-05-22 11:37:27 +0000
commite8ba538d034fb50549bb838b6446d8c1fad8379f (patch)
tree47f8b213464e6d7b60bb9a0187d12b291c5de684 /chipset_enable.c
parent690bcbaf7f310c49a8c7ba9300d454f1dbc044ce (diff)
downloadflashrom-e8ba538d034fb50549bb838b6446d8c1fad8379f.tar.gz
flashrom-e8ba538d034fb50549bb838b6446d8c1fad8379f.tar.bz2
flashrom-e8ba538d034fb50549bb838b6446d8c1fad8379f.zip
A bunch of output beautifications and improvements, as well as doc fixes
- Update manpage, we now report supported boards via -L. - Add some missing escaping for '-' characters in the manpage. Corresponding to flashrom svn r543. - Shorten some of the really long device names, so that -L output looks nicer. - Display a "table header" for all entries/columns in -L output. - Make -L output tabular for all lists for better readability. - Do not print "unknown XXXX SPI chip" entries in -L output. - And random other cosmetics... Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
Diffstat (limited to 'chipset_enable.c')
-rw-r--r--chipset_enable.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/chipset_enable.c b/chipset_enable.c
index 15e5df4ca..3cac2c8fe 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -26,6 +26,7 @@
#define _LARGEFILE64_SOURCE
#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
@@ -1011,16 +1012,21 @@ const struct penable chipset_enables[] = {
void print_supported_chipsets(void)
{
- int i;
-
- printf("\nSupported chipsets:\n\n");
-
- for (i = 0; chipset_enables[i].vendor_name != NULL; i++) {
- printf("%s %s [%04x:%04x]%s\n", chipset_enables[i].vendor_name,
- chipset_enables[i].device_name,
- chipset_enables[i].vendor_id,
- chipset_enables[i].device_id,
- (chipset_enables[i].status == OK) ? "" : " (untested)");
+ int i, j;
+ const struct penable *c = chipset_enables;
+
+ printf("\nSupported chipsets:\n\nVendor: Chipset:"
+ " PCI IDs:\n\n");
+
+ for (i = 0; c[i].vendor_name != NULL; i++) {
+ printf("%s", c[i].vendor_name);
+ for (j = 0; j < 25 - strlen(c[i].vendor_name); j++)
+ printf(" ");
+ printf("%s", c[i].device_name);
+ for (j = 0; j < 25 - strlen(c[i].device_name); j++)
+ printf(" ");
+ printf("%04x:%04x%s\n", c[i].vendor_id, c[i].device_id,
+ (c[i].status == OK) ? "" : " (untested)");
}
}