diff options
Diffstat (limited to 'src/plugins/abrt-dump-oops.c')
-rw-r--r-- | src/plugins/abrt-dump-oops.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/abrt-dump-oops.c b/src/plugins/abrt-dump-oops.c index 07e2618b..bf4f1e96 100644 --- a/src/plugins/abrt-dump-oops.c +++ b/src/plugins/abrt-dump-oops.c @@ -534,9 +534,8 @@ int main(int argc, char **argv) if (env_verbose) g_verbose = atoi(env_verbose); - const char *filename = "/var/log/messages"; - - const char *program_usage = _( + /* Can't keep these strings/structs static: _() doesn't support that */ + const char *program_usage_string = _( PROGNAME" [-vsrdow] FILE\n" "\n" "Extract oops from syslog/dmesg file" @@ -559,12 +558,7 @@ int main(int argc, char **argv) OPT_BOOL('w', NULL, NULL, _("Do not exit, watch the file for new oopses")), OPT_END() }; - - unsigned opts = parse_opts(argc, argv, program_options, program_usage); - argv += optind; - if (!argv[0]) - show_usage_and_die(program_usage, program_options); - filename = argv[0]; + unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); msg_prefix = PROGNAME; @@ -575,6 +569,11 @@ int main(int argc, char **argv) logmode = LOGMODE_SYSLOG; } + argv += optind; + if (!argv[0]) + show_usage_and_die(program_usage_string, program_options); + const char *filename = argv[0]; + int inotify_fd = -1; if (opts & OPT_w) { |