diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-04 14:39:37 +0200 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-04 14:39:37 +0200 |
| commit | 58e7efce3d5ac71e308e7e44176473cd66e8ad26 (patch) | |
| tree | d4822587940487f2910e925990a55377e60e05bd /src/plugins/abrt-action-bugzilla.cpp | |
| parent | 27e7d86db7c6c96e8da75e8e8dda6359b9e73c41 (diff) | |
| download | abrt-58e7efce3d5ac71e308e7e44176473cd66e8ad26.tar.gz abrt-58e7efce3d5ac71e308e7e44176473cd66e8ad26.tar.xz abrt-58e7efce3d5ac71e308e7e44176473cd66e8ad26.zip | |
move $ABRT_foo checking and setting into helper routines.
I'm sick of fixing incorrect PROGNAME defines.
Now g_progname is a variable and it is set from argv[0].
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins/abrt-action-bugzilla.cpp')
| -rw-r--r-- | src/plugins/abrt-action-bugzilla.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/plugins/abrt-action-bugzilla.cpp b/src/plugins/abrt-action-bugzilla.cpp index 995b73c1..e8a605f1 100644 --- a/src/plugins/abrt-action-bugzilla.cpp +++ b/src/plugins/abrt-action-bugzilla.cpp @@ -21,8 +21,6 @@ #include "abrt_problem_data.h" #include "parse_options.h" -#define PROGNAME "abrt-action-bugzilla" - #define XML_RPC_SUFFIX "/xmlrpc.cgi" #define MAX_HOPS 5 @@ -908,9 +906,7 @@ static void report_to_bugzilla( int main(int argc, char **argv) { - char *env_verbose = getenv("ABRT_VERBOSE"); - if (env_verbose) - g_verbose = atoi(env_verbose); + abrt_init(argv); map_string_h *settings = new_map_string(); const char *dump_dir_name = "."; @@ -918,7 +914,7 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - PROGNAME" [-v] -c CONFFILE -d DIR\n" + "\b [-v] -c CONFFILE -d DIR\n" "\n" "Reports problem to Bugzilla" ); @@ -936,11 +932,7 @@ int main(int argc, char **argv) }; /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string); - putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose)); - - char *pfx = getenv("ABRT_PROG_PREFIX"); - if (pfx && string_to_bool(pfx)) - msg_prefix = PROGNAME; + export_abrt_envvars(0); while (conf_file) { |
