summaryrefslogtreecommitdiffstats
path: root/src/plugins/abrt-action-generate-backtrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/abrt-action-generate-backtrace.c')
-rw-r--r--src/plugins/abrt-action-generate-backtrace.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/abrt-action-generate-backtrace.c b/src/plugins/abrt-action-generate-backtrace.c
index 7defc9c4..445a7b76 100644
--- a/src/plugins/abrt-action-generate-backtrace.c
+++ b/src/plugins/abrt-action-generate-backtrace.c
@@ -254,33 +254,31 @@ int main(int argc, char **argv)
/* Can't keep these strings/structs static: _() doesn't support that */
const char *program_usage_string = _(
- PROGNAME" [options] -d DIR"
+ PROGNAME" [options] -d DIR\n"
+ "\n"
+ "Generates and saves backtrace for coredump in dump directory DIR"
);
enum {
OPT_v = 1 << 0,
OPT_d = 1 << 1,
OPT_i = 1 << 2,
OPT_t = 1 << 3,
- OPT_s = 1 << 4,
};
/* Keep enum above and order of options below in sync! */
struct options program_options[] = {
OPT__VERBOSE(&g_verbose),
- OPT_STRING( 'd', NULL, &dump_dir_name , "DIR" , _("Crash dump directory")),
- OPT_STRING( 'i', NULL, &i_opt , "dir1[:dir2]...", _("Additional debuginfo directories")),
+ OPT_STRING( 'd', NULL, &dump_dir_name , "DIR" , _("Dump directory")),
+ OPT_STRING( 'i', NULL, &i_opt , "DIR1[:DIR2]...", _("Additional debuginfo directories")),
OPT_INTEGER('t', NULL, &exec_timeout_sec, _("Kill gdb if it runs for more than N seconds")),
- OPT_BOOL( 's', NULL, NULL , _("Log to syslog")),
OPT_END()
};
- unsigned opts = parse_opts(argc, argv, program_options, program_usage_string);
+ /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string);
putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose));
- //msg_prefix = PROGNAME;
- if (opts & OPT_s)
- {
- openlog(msg_prefix, 0, LOG_DAEMON);
- logmode = LOGMODE_SYSLOG;
- }
+
+ char *pfx = getenv("ABRT_PROG_PREFIX");
+ if (pfx && string_to_bool(pfx))
+ msg_prefix = PROGNAME;
if (i_opt)
{