From 33eb4645cae0e57918e779d5892ebb7d14ffb485 Mon Sep 17 00:00:00 2001 From: Burt P Date: Wed, 24 Oct 2018 01:48:53 -0500 Subject: 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 --- hardinfo/util.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'hardinfo') 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 -- cgit v1.2.3