From dd428301eb6f02542015121d7b08d9997f137e50 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Tue, 12 Mar 2019 15:13:33 +0100 Subject: New upstream version 1.15.91 --- src/main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 36356a7a..9f979cf4 100644 --- a/src/main.c +++ b/src/main.c @@ -23,15 +23,12 @@ #include #include -#include #include #include -#include #include #include #include #include -#include #include #include "main-utils.h" @@ -233,6 +230,7 @@ main (int argc, char *argv[]) guint sd_id = 0; GError *error_invalid_logging_config = NULL; const char *const *warnings; + int errsv; /* Known to cause a possible deadlock upon GDBus initialization: * https://bugzilla.gnome.org/show_bug.cgi?id=674885 */ @@ -334,12 +332,10 @@ main (int argc, char *argv[]) if (global_opt.become_daemon && !nm_config_get_is_debug (config)) { if (daemon (0, 0) < 0) { - int saved_errno; - - saved_errno = errno; + errsv = errno; fprintf (stderr, _("Could not daemonize: %s [error %u]\n"), - g_strerror (saved_errno), - saved_errno); + nm_strerror_native (errsv), + errsv); exit (1); } wrote_pidfile = nm_main_utils_write_pidfile (global_opt.pidfile); @@ -355,7 +351,7 @@ main (int argc, char *argv[]) NM_CONFIG_KEYFILE_GROUP_LOGGING, NM_CONFIG_KEYFILE_KEY_LOGGING_BACKEND, NM_CONFIG_GET_VALUE_STRIP | NM_CONFIG_GET_VALUE_NO_EMPTY); - nm_logging_syslog_openlog (v, nm_config_get_is_debug (config)); + nm_logging_init (v, nm_config_get_is_debug (config)); } nm_log_info (LOGD_CORE, "NetworkManager (version " NM_DIST_VERSION ") is starting... (%s)", -- cgit 1.3.0-6-gf8a5