diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-11-19 19:38:31 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-11-19 19:38:31 +0000 |
commit | 5e7c1a3a03269b5088b26ecf9c676518d65a05e4 (patch) | |
tree | d4b9b5c0731a252954a897892633d1f7f6c8fbc4 /hardinfo2/hardinfo.c | |
parent | 8708504c28caeee4bd3e95b6b6d739970863f19c (diff) |
Run hardinfo with the '-r' command-line parameter and you'll get a report in standard output. :)
Diffstat (limited to 'hardinfo2/hardinfo.c')
-rw-r--r-- | hardinfo2/hardinfo.c | 14 |
1 files changed, 8 insertions, 6 deletions
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 <config.h> #include <shell.h> +#include <report.h> #include <hardinfo.h> #include <iconcache.h> #include <stock.h> @@ -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; } |