diff options
| author | Michael Biebl <biebl@debian.org> | 2016-03-01 16:56:10 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-03-01 16:56:10 +0100 |
| commit | e62b307a9dd108e664aa507355ed3dd15a9c6d67 (patch) | |
| tree | 2957d1a0dde11be8bd9f506f8b075d21b85da2d0 /src/main.c | |
| parent | de39787fedbff438bd933c30675fc5c026db6aa0 (diff) | |
| parent | c2de0d98ba39e0a1a970d066fd19be786092f376 (diff) | |
Merge tag 'upstream/1.1.91'
Upstream version 1.1.91
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/main.c b/src/main.c index ee8e0f2d..9495a9ef 100644 --- a/src/main.c +++ b/src/main.c @@ -19,7 +19,7 @@ * Copyright (C) 2005 - 2008 Novell, Inc. */ -#include "config.h" +#include "nm-default.h" #include <getopt.h> #include <locale.h> @@ -35,7 +35,6 @@ #include <string.h> #include <sys/resource.h> -#include "nm-default.h" #include "nm-dbus-interface.h" #include "NetworkManagerUtils.h" #include "main-utils.h" @@ -165,17 +164,11 @@ _init_nm_debug (const char *debug) { "RLIMIT_CORE", D_RLIMIT_CORE }, { "fatal-warnings", D_FATAL_WARNINGS }, }; - guint flags = 0; + guint flags; const char *env = getenv ("NM_DEBUG"); - if (env && strcasecmp (env, "help") != 0) { - /* g_parse_debug_string() prints options to stderr if the variable - * is set to "help". Don't allow that. */ - flags = g_parse_debug_string (env, keys, G_N_ELEMENTS (keys)); - } - - if (debug && strcasecmp (debug, "help") != 0) - flags |= g_parse_debug_string (debug, keys, G_N_ELEMENTS (keys)); + flags = nm_utils_parse_debug_string (env, keys, G_N_ELEMENTS (keys)); + flags |= nm_utils_parse_debug_string (debug, keys, G_N_ELEMENTS (keys)); if (NM_FLAGS_HAS (flags, D_RLIMIT_CORE)) { /* only enable this, if explicitly requested, because it might |