Code

Removed newline at the end of sdb_log()'ed strings.
[sysdb.git] / src / daemon / sysdbd.c
index fa314909fef5ed26dbcc6ae6da783333ed08a684..e977c2f25762df6aade8df8c0f26213d1cd1d870 100644 (file)
@@ -108,7 +108,7 @@ daemonize(void)
 
        if ((pid = fork()) < 0) {
                char errbuf[1024];
-               sdb_log(SDB_LOG_ERR, "Failed to fork to background: %s\n",
+               sdb_log(SDB_LOG_ERR, "Failed to fork to background: %s",
                                sdb_strerror(errno, errbuf, sizeof(errbuf)));
                return errno;
        }
@@ -120,7 +120,7 @@ daemonize(void)
        if (chdir("/")) {
                char errbuf[1024];
                sdb_log(SDB_LOG_ERR, "Failed to change working directory to "
-                               "the root directory: %s\n",
+                               "the root directory: %s",
                                sdb_strerror(errno, errbuf, sizeof(errbuf)));
                return errno;
        }
@@ -131,24 +131,24 @@ daemonize(void)
        close(0);
        if (open("/dev/null", O_RDWR)) {
                char errbuf[1024];
-               sdb_log(SDB_LOG_ERR, "Failed to connect stdin to '/dev/null': "
-                               "%s\n", sdb_strerror(errno, errbuf, sizeof(errbuf)));
+               sdb_log(SDB_LOG_ERR, "Failed to connect stdin to '/dev/null': %s",
+                               sdb_strerror(errno, errbuf, sizeof(errbuf)));
                return errno;
        }
 
        close(1);
        if (dup(0) != 1) {
                char errbuf[1024];
-               sdb_log(SDB_LOG_ERR, "Could not connect stdout to '/dev/null': "
-                               "%s\n", sdb_strerror(errno, errbuf, sizeof(errbuf)));
+               sdb_log(SDB_LOG_ERR, "Could not connect stdout to '/dev/null': %s",
+                               sdb_strerror(errno, errbuf, sizeof(errbuf)));
                return errno;
        }
 
        close(2);
        if (dup(0) != 2) {
                char errbuf[1024];
-               sdb_log(SDB_LOG_ERR, "Could not connect stderr to '/dev/null': "
-                               "%s\n", sdb_strerror(errno, errbuf, sizeof(errbuf)));
+               sdb_log(SDB_LOG_ERR, "Could not connect stderr to '/dev/null': %s",
+                               sdb_strerror(errno, errbuf, sizeof(errbuf)));
                return errno;
        }
        return 0;
@@ -194,7 +194,7 @@ main(int argc, char **argv)
                config_filename = CONFIGFILE;
 
        if (daemon_parse_config(config_filename)) {
-               sdb_log(SDB_LOG_ERR, "Failed to parse configuration file.\n");
+               sdb_log(SDB_LOG_ERR, "Failed to parse configuration file.");
                exit(1);
        }
 
@@ -205,13 +205,13 @@ main(int argc, char **argv)
        if (sigaction(SIGINT, &sa_intterm, /* old action */ NULL)) {
                char errbuf[1024];
                sdb_log(SDB_LOG_ERR, "Failed to install signal handler for "
-                               "SIGINT: %s\n", sdb_strerror(errno, errbuf, sizeof(errbuf)));
+                               "SIGINT: %s", sdb_strerror(errno, errbuf, sizeof(errbuf)));
                exit(1);
        }
        if (sigaction(SIGTERM, &sa_intterm, /* old action */ NULL)) {
                char errbuf[1024];
                sdb_log(SDB_LOG_ERR, "Failed to install signal handler for "
-                               "SIGTERM: %s\n", sdb_strerror(errno, errbuf, sizeof(errbuf)));
+                               "SIGTERM: %s", sdb_strerror(errno, errbuf, sizeof(errbuf)));
                exit(1);
        }
 
@@ -220,14 +220,14 @@ main(int argc, char **argv)
                        exit(1);
 
        sdb_log(SDB_LOG_INFO, "SysDB daemon "SDB_VERSION_STRING
-                       SDB_VERSION_EXTRA " (pid %i) initialized successfully\n",
+                       SDB_VERSION_EXTRA " (pid %i) initialized successfully",
                        (int)getpid());
 
        sdb_plugin_init_all();
        sdb_plugin_collector_loop(&plugin_main_loop);
 
        sdb_log(SDB_LOG_INFO, "Shutting down SysDB daemon "SDB_VERSION_STRING
-                       SDB_VERSION_EXTRA" (pid %i)\n", (int)getpid());
+                       SDB_VERSION_EXTRA" (pid %i)", (int)getpid());
 
        fprintf(stderr, "Store dump:\n");
        sdb_store_dump(stderr);