From 5e7c1a3a03269b5088b26ecf9c676518d65a05e4 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sun, 19 Nov 2006 19:38:31 +0000 Subject: Run hardinfo with the '-r' command-line parameter and you'll get a report in standard output. :) --- hardinfo2/hardinfo.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'hardinfo2/hardinfo.c') diff --git a/hardinfo2/hardinfo.c b/hardinfo2/hardinfo.c index ebf65d9f..63609a3c 100644 --- a/hardinfo2/hardinfo.c +++ b/hardinfo2/hardinfo.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -64,14 +65,15 @@ main(int argc, char **argv) shell_init(modules); gtk_main(); - - g_return_val_if_reached(0); } else if (params.create_report) { - g_print("creating report...\n"); + gchar *report; + + report = report_create_from_module_list_format(modules, + params.report_format); + g_print("%s", report); - g_return_val_if_reached(0); + g_free(report); } - /* should not be reached */ - g_return_val_if_reached(1); + return 0; } -- cgit v1.2.3