aboutsummaryrefslogtreecommitdiff
path: root/hardinfo/util.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2018-10-24 01:48:53 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2018-11-04 15:01:49 -0800
commit33eb4645cae0e57918e779d5892ebb7d14ffb485 (patch)
treed5b857dd923d9c31dd7a0deb5f45dc344d095e12 /hardinfo/util.c
parentb6b83055b3ec9f35b4192ea43b7aa5cd152f59aa (diff)
report: add "shell" report format
Just dumps the conf/keyfile-format output. Very useful for development. Try `hardinfo -s -w -r -f shell >shell_dump.txt` Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'hardinfo/util.c')
-rw-r--r--hardinfo/util.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/hardinfo/util.c b/hardinfo/util.c
index 81b7e743..c58e2e1a 100644
--- a/hardinfo/util.c
+++ b/hardinfo/util.c
@@ -407,7 +407,7 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param)
.short_name = 'f',
.arg = G_OPTION_ARG_STRING,
.arg_data = &report_format,
- .description = N_("chooses a report format (text, html)")},
+ .description = N_("chooses a report format ([text], html)")},
{
.long_name = "run-benchmark",
.short_name = 'b',
@@ -496,8 +496,12 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param)
param->force_all_details = force_all_details;
param->argv0 = *(argv)[0];
- if (report_format && g_str_equal(report_format, "html"))
- param->report_format = REPORT_FORMAT_HTML;
+ if (report_format) {
+ if (g_str_equal(report_format, "html"))
+ param->report_format = REPORT_FORMAT_HTML;
+ if (g_str_equal(report_format, "shell"))
+ param->report_format = REPORT_FORMAT_SHELL;
+ }
/* html ok?
* gui: yes