aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/common.c
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-04-08 15:05:09 +0200
committerMartin Roth <martinroth@google.com>2018-04-11 14:12:00 +0000
commitfbc66b9dc035bcd287d434363ce984c41118bf95 (patch)
treee7c9d6916bc5d0db0274a5577732beb6cdf9395f /util/cbfstool/common.c
parente32cea15c8534faa817f32cd3dd9ae89e44f6d98 (diff)
util/cbfstool: Print all supported architectures
The list of supported architectures in the usage output of cbfstool is currently hardcoded and outdated. Use the arch_names array in common.c to provide and up-to-date list. Change-Id: I3e7ed67c3bfd928b304c314fcc8e1bea35561662 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/25590 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/cbfstool/common.c')
-rw-r--r--util/cbfstool/common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index 72ff745f1d..14ccaa9584 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -168,6 +168,18 @@ const char *arch_to_string(uint32_t a)
return ret;
}
+void print_supported_architectures(void)
+{
+ size_t i;
+
+ for (i = 0; i < ARRAY_SIZE(arch_names); i++) {
+ printf(i == 0? " ":", ");
+ printf("%s", arch_names[i].name);
+ }
+
+ printf("\n");
+}
+
void print_supported_filetypes(void)
{
int i, number = ARRAY_SIZE(filetypes);