diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-03-24 16:41:48 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-03-24 16:41:48 +0100 |
commit | cb97c98086b17213f93f4e6588785f38787e9d6d (patch) | |
tree | 8088e83deb7ecf6e6de2c903c5fe4a6910dd8c19 /src/plugins | |
parent | 6f3b96714eb3afab7544f89f2e944616c673b76d (diff) | |
download | abrt-cb97c98086b17213f93f4e6588785f38787e9d6d.tar.gz abrt-cb97c98086b17213f93f4e6588785f38787e9d6d.tar.xz abrt-cb97c98086b17213f93f4e6588785f38787e9d6d.zip |
wizard: add keyboard accelerator for "Configure Events" buttons
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/abrt-action-print.c | 21 | ||||
-rw-r--r-- | src/plugins/report_Logger.conf | 1 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/abrt-action-print.c b/src/plugins/abrt-action-print.c index a5d7219b..f34fd014 100644 --- a/src/plugins/abrt-action-print.c +++ b/src/plugins/abrt-action-print.c @@ -25,6 +25,7 @@ static const char *dump_dir_name = "."; static const char *output_file = NULL; +static const char *append = "no"; static const char *open_mode = "w"; int main(int argc, char **argv) @@ -35,20 +36,22 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-v] [-o FILE] -d DIR\n" + PROGNAME" [-v] -d DIR [-o FILE] [-a yes/no]\n" "\n" - "Print information about the crash to standard output" + "Print problem information to standard output or FILE" ); enum { OPT_v = 1 << 0, OPT_d = 1 << 1, OPT_o = 1 << 2, + OPT_a = 1 << 3, }; /* 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('o', NULL, &output_file , "FILE", _("Output file")), + OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")), + OPT_STRING('o', NULL, &output_file , "FILE" , _("Output file")), + OPT_STRING('a', NULL, &append , "yes/no", _("Append to, or overwrite FILE")), OPT_END() }; /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); @@ -56,18 +59,12 @@ int main(int argc, char **argv) putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); //msg_prefix = PROGNAME; -//TODO: convert to an option: - char *env = getenv("Logger_AppendLogs"); - VERB3 log("Logger_AppendLogs env:'%s'", env); - if (env && string_to_bool(env)) - open_mode = "a"; - if (output_file) { + if (string_to_bool(append)) + open_mode = "a"; if (!freopen(output_file, open_mode, stdout)) - { perror_msg_and_die("Can't open '%s'", output_file); - } } struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); diff --git a/src/plugins/report_Logger.conf b/src/plugins/report_Logger.conf index 87e36882..d885ce5e 100644 --- a/src/plugins/report_Logger.conf +++ b/src/plugins/report_Logger.conf @@ -1 +1,2 @@ Log_File=/tmp/abrt.log +Append=yes |