chiark / gitweb /
Rename formats-util.h to format-util.h
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 7 Nov 2016 15:14:59 +0000 (10:14 -0500)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:35 +0000 (17:58 +0200)
We don't have plural in the name of any other -util files and this
inconsistency trips me up every time I try to type this file name
from memory. "formats-util" is even hard to pronounce.

24 files changed:
src/basic/cgroup-util.c
src/basic/log.c
src/basic/process-util.h
src/basic/socket-util.c
src/basic/user-util.c
src/basic/util.h
src/libelogind/sd-bus/bus-creds.c
src/libelogind/sd-bus/bus-kernel.c
src/libelogind/sd-bus/bus-socket.c
src/libelogind/sd-login/sd-login.c
src/libelogind/sd-login/test-login.c
src/login/inhibit.c
src/login/logind-acl.c
src/login/logind-action.c
src/login/logind-dbus.c
src/login/logind-inhibit.c
src/login/logind-seat.c
src/login/logind-session.c
src/login/logind-user-dbus.c
src/login/logind-user.c
src/login/logind-utmp.c
src/login/logind.c
src/login/pam_elogind.c
src/shared/clean-ipc.c

index 953bb86f63cf3d7a7a8dabc5ae425ba74b514156..b95d70a1879e33f6526ef18a0c78a1b2d303c255 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/stat.h>
 //#include <sys/statfs.h>
 #include <sys/types.h>
+#include <sys/xattr.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
@@ -37,7 +38,7 @@
 #include "extract-word.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "fs-util.h"
 //#include "log.h"
 #include "login-util.h"
index 0783372c5aa0cc738d50a8572ddedf8870b76c65..2f54194ebd17bf4066ecf1a01418bd9f33ac1427 100644 (file)
@@ -249,14 +249,14 @@ int log_open(void) {
                 return 0;
         }
 
-        if (!IN_SET(log_target, LOG_TARGET_AUTO, LOG_TARGET_SAFE) ||
+        if ((log_target != LOG_TARGET_AUTO && log_target != LOG_TARGET_SAFE) ||
             getpid() == 1 ||
             isatty(STDERR_FILENO) <= 0) {
 
 #if 0 /// elogind does not support logging to systemd-journald
-                if (IN_SET(log_target, LOG_TARGET_AUTO,
-                                       LOG_TARGET_JOURNAL_OR_KMSG,
-                                       LOG_TARGET_JOURNAL)) {
+                if (log_target == LOG_TARGET_AUTO ||
+                    log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
+                    log_target == LOG_TARGET_JOURNAL) {
                         r = log_open_journal();
                         if (r >= 0) {
                                 log_close_syslog();
@@ -266,8 +266,8 @@ int log_open(void) {
                 }
 #endif // 0
 
-                if (IN_SET(log_target, LOG_TARGET_SYSLOG_OR_KMSG,
-                                       LOG_TARGET_SYSLOG)) {
+                if (log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
+                    log_target == LOG_TARGET_SYSLOG) {
                         r = log_open_syslog();
                         if (r >= 0) {
                                 log_close_journal();
@@ -276,11 +276,11 @@ int log_open(void) {
                         }
                 }
 
-                if (IN_SET(log_target, LOG_TARGET_AUTO,
-                                       LOG_TARGET_SAFE,
-                                       LOG_TARGET_JOURNAL_OR_KMSG,
-                                       LOG_TARGET_SYSLOG_OR_KMSG,
-                                       LOG_TARGET_KMSG)) {
+                if (log_target == LOG_TARGET_AUTO ||
+                    log_target == LOG_TARGET_SAFE ||
+                    log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
+                    log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
+                    log_target == LOG_TARGET_KMSG) {
                         r = log_open_kmsg();
                         if (r >= 0) {
                                 log_close_journal();
@@ -513,7 +513,7 @@ static int log_do_header(
                  line ? "CODE_LINE=" : "",
                  line ? 1 : 0, line, /* %.0d means no output too, special case for 0 */
                  line ? "\n" : "",
-                 isempty(func) ? "" : "CODE_FUNC=",
+                 isempty(func) ? "" : "CODE_FUNCTION=",
                  isempty(func) ? "" : func,
                  isempty(func) ? "" : "\n",
                  error ? "ERRNO=" : "",
@@ -603,9 +603,9 @@ static int log_dispatch(
                         *(e++) = 0;
 
 #if 0 /// elogind does not support logging to systemd-journald
-                if (IN_SET(log_target, LOG_TARGET_AUTO,
-                                       LOG_TARGET_JOURNAL_OR_KMSG,
-                                       LOG_TARGET_JOURNAL)) {
+                if (log_target == LOG_TARGET_AUTO ||
+                    log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
+                    log_target == LOG_TARGET_JOURNAL) {
 
                         k = write_to_journal(level, error, file, line, func, object_field, object, extra_field, extra, buffer);
                         if (k < 0) {
@@ -616,8 +616,8 @@ static int log_dispatch(
                 }
 #endif // 0
 
-                if (IN_SET(log_target, LOG_TARGET_SYSLOG_OR_KMSG,
-                                       LOG_TARGET_SYSLOG)) {
+                if (log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
+                    log_target == LOG_TARGET_SYSLOG) {
 
                         k = write_to_syslog(level, error, file, line, func, buffer);
                         if (k < 0) {
@@ -628,11 +628,11 @@ static int log_dispatch(
                 }
 
                 if (k <= 0 &&
-                    IN_SET(log_target, LOG_TARGET_AUTO,
-                                       LOG_TARGET_SAFE,
-                                       LOG_TARGET_SYSLOG_OR_KMSG,
-                                       LOG_TARGET_JOURNAL_OR_KMSG,
-                                       LOG_TARGET_KMSG)) {
+                    (log_target == LOG_TARGET_AUTO ||
+                     log_target == LOG_TARGET_SAFE ||
+                     log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
+                     log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
+                     log_target == LOG_TARGET_KMSG)) {
 
                         k = write_to_kmsg(level, error, file, line, func, buffer);
                         if (k < 0) {
@@ -898,9 +898,9 @@ int log_struct_internal(
                 level = log_facility | LOG_PRI(level);
 
 #if 0 /// elogind does not support logging to systemd-journald
-        if (IN_SET(log_target, LOG_TARGET_AUTO,
-                               LOG_TARGET_JOURNAL_OR_KMSG,
-                               LOG_TARGET_JOURNAL) &&
+        if ((log_target == LOG_TARGET_AUTO ||
+             log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
+             log_target == LOG_TARGET_JOURNAL) &&
             journal_fd >= 0) {
                 char header[LINE_MAX];
                 struct iovec iovec[17] = {};
@@ -999,30 +999,24 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
         if (streq(key, "debug") && !value)
                 log_set_max_level(LOG_DEBUG);
 
-        else if (proc_cmdline_key_streq(key, "systemd.log_target")) {
-
-                if (proc_cmdline_value_missing(key, value))
-                        return 0;
+        else if (streq(key, "systemd.log_target") && value) {
 
                 if (log_set_target_from_string(value) < 0)
                         log_warning("Failed to parse log target '%s'. Ignoring.", value);
 
-        } else if (proc_cmdline_key_streq(key, "systemd.log_level")) {
-
-                if (proc_cmdline_value_missing(key, value))
-                        return 0;
+        } else if (streq(key, "systemd.log_level") && value) {
 
                 if (log_set_max_level_from_string(value) < 0)
                         log_warning("Failed to parse log level '%s'. Ignoring.", value);
 
-        } else if (proc_cmdline_key_streq(key, "systemd.log_color")) {
+        } else if (streq(key, "systemd.log_color") && value) {
 
-                if (log_show_color_from_string(value ?: "1") < 0)
+                if (log_show_color_from_string(value) < 0)
                         log_warning("Failed to parse log color setting '%s'. Ignoring.", value);
 
-        } else if (proc_cmdline_key_streq(key, "systemd.log_location")) {
+        } else if (streq(key, "systemd.log_location") && value) {
 
-                if (log_show_location_from_string(value ?: "1") < 0)
+                if (log_show_location_from_string(value) < 0)
                         log_warning("Failed to parse log location setting '%s'. Ignoring.", value);
         }
 
@@ -1033,9 +1027,10 @@ void log_parse_environment(void) {
         const char *e;
 
         if (get_ctty_devnr(0, NULL) < 0)
-                /* Only try to read the command line in daemons.  We assume that anything that has a controlling tty is
-                   user stuff. */
-                (void) proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_STRIP_RD_PREFIX);
+                /* Only try to read the command line in daemons.
+                   We assume that anything that has a controlling
+                   tty is user stuff. */
+                (void) parse_proc_cmdline(parse_proc_cmdline_item, NULL, true);
 
         e = secure_getenv("SYSTEMD_LOG_TARGET");
         if (e && log_set_target_from_string(e) < 0)
@@ -1101,8 +1096,8 @@ int log_show_location_from_string(const char *e) {
 }
 
 bool log_on_console(void) {
-        if (IN_SET(log_target, LOG_TARGET_CONSOLE,
-                               LOG_TARGET_CONSOLE_PREFIXED))
+        if (log_target == LOG_TARGET_CONSOLE ||
+            log_target == LOG_TARGET_CONSOLE_PREFIXED)
                 return true;
 
         return syslog_fd < 0 && kmsg_fd < 0 && journal_fd < 0;
@@ -1161,8 +1156,8 @@ int log_syntax_internal(
 
         PROTECT_ERRNO;
         char buffer[LINE_MAX];
+        int r;
         va_list ap;
-        const char *unit_fmt = NULL;
 
         if (error < 0)
                 error = -error;
@@ -1181,15 +1176,24 @@ int log_syntax_internal(
         va_end(ap);
 
         if (unit)
-                unit_fmt = getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s";
-
-        return log_struct_internal(
-                        level, error,
-                        file, line, func,
-                        "MESSAGE_ID=" SD_MESSAGE_INVALID_CONFIGURATION_STR,
-                        "CONFIG_FILE=%s", config_file,
-                        "CONFIG_LINE=%u", config_line,
-                        LOG_MESSAGE("%s:%u: %s", config_file, config_line, buffer),
-                        unit_fmt, unit,
-                        NULL);
+                r = log_struct_internal(
+                                level, error,
+                                file, line, func,
+                                getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s", unit,
+                                LOG_MESSAGE_ID(SD_MESSAGE_INVALID_CONFIGURATION),
+                                "CONFIG_FILE=%s", config_file,
+                                "CONFIG_LINE=%u", config_line,
+                                LOG_MESSAGE("[%s:%u] %s", config_file, config_line, buffer),
+                                NULL);
+        else
+                r = log_struct_internal(
+                                level, error,
+                                file, line, func,
+                                LOG_MESSAGE_ID(SD_MESSAGE_INVALID_CONFIGURATION),
+                                "CONFIG_FILE=%s", config_file,
+                                "CONFIG_LINE=%u", config_line,
+                                LOG_MESSAGE("[%s:%u] %s", config_file, config_line, buffer),
+                                NULL);
+
+        return r;
 }
index c05d05d7831990381c25f45590e2810a63d81422..e904feed0fde45975d4e18c9ab1abcfeb2dfac68 100644 (file)
@@ -26,8 +26,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sys/resource.h>
 
-#include "formats-util.h"
+#include "format-util.h"
 #include "macro.h"
 
 #define procfs_file_alloca(pid, field)                                  \
index 4c1869353f31ff9d9e4f97ee92c2668105e5e27b..1d43a48aea88d4980154b79b6e0c3ccd03cd63b0 100644 (file)
@@ -33,7 +33,7 @@
 #include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "log.h"
 #include "macro.h"
 #include "missing.h"
index 9ef19a1f692df044c5c2f410e77e45e3efb6e55a..51336137a20e7e82dc98626d94e39a3e5eadac5b 100644 (file)
@@ -34,7 +34,7 @@
 #include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "macro.h"
 #include "missing.h"
 #include "parse-util.h"
index 75631c436bdc560edc0395246ada2f6814e96b33..5283f96b7195c25ce7a5b8636efc7e47b914f11f 100644 (file)
@@ -41,7 +41,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#include "formats-util.h"
+#include "format-util.h"
 #include "macro.h"
 #include "missing.h"
 #include "time-util.h"
index 255d1c503ccb39d71d9adad550a51b9b417392cf..3cb996171ec78d529a286e44edcd57a565fb69cc 100644 (file)
@@ -30,7 +30,7 @@
 #include "cgroup-util.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "hexdecoct.h"
 #include "parse-util.h"
 #include "process-util.h"
index 5db011b710cd9f2de18f92c3166663297038dfae..aef1511271f4a0fae0ca29803ad3f8eba5a52c20 100644 (file)
@@ -42,7 +42,7 @@
 #include "capability-util.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "memfd-util.h"
 #include "parse-util.h"
 #include "stdio-util.h"
@@ -1650,7 +1650,7 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
         if (s) {
                 char *p;
 
-                p = strjoin("/sys/fs/kdbus/", n->str, "/bus", NULL);
+                p = strjoin("/sys/fs/kdbus/", n->str, "/bus");
                 if (!p) {
                         safe_close(fd);
                         return -ENOMEM;
index cfd775313905a9faa79c1f5c31dd4571f2dbf939..e6ed15eb71d4d97f4c7993db4d601c7abda5ea19 100644 (file)
@@ -30,7 +30,7 @@
 #include "bus-message.h"
 #include "bus-socket.h"
 #include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "hexdecoct.h"
 #include "macro.h"
 #include "missing.h"
index f41e1a855b37dfbb0a18b94b955f19f0d3afab8c..9d096841430be92e5af2ba785e47fd504a1d2c6e 100644 (file)
@@ -31,7 +31,7 @@
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "fs-util.h"
 #include "hostname-util.h"
 #include "io-util.h"
index e0a838d3fef011e8b5b7b43aad84c1a34f03d58f..e1559c68842f1e1171e87de20dbf796872bcb7b1 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "alloc-util.h"
 #include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"
index 5906cec07c19ade55715687aeb2c5d209a2b59fd..896fd570a5b6eabd8b6e58e20b6efca009a4c8cb 100644 (file)
@@ -29,7 +29,7 @@
 #include "bus-error.h"
 #include "bus-util.h"
 #include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "process-util.h"
 #include "signal-util.h"
 #include "strv.h"
index 0cef88a82de98501aff137592a9690c3b0d0f6ce..1b69f4b9ca77b449f1abeac11c2f9c7c8e757058 100644 (file)
@@ -25,7 +25,7 @@
 #include "dirent-util.h"
 #include "escape.h"
 #include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "logind-acl.h"
 #include "set.h"
 #include "string-util.h"
index bcf7b86a3b1d205bd259072345a077cab9464dce..48d9fb856e2a83f35cd0c0c62e0dfab5af12d379 100644 (file)
@@ -23,7 +23,7 @@
 #include "bus-error.h"
 #include "bus-util.h"
 #include "conf-parser.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "logind-action.h"
 #include "process-util.h"
 #include "sleep-config.h"
index 971b447a7cacef640fdac75a0eb4f59f59b4218c..a605666429ce2fb00880a32a2be03abe1c717df7 100644 (file)
@@ -1301,7 +1301,8 @@ static int flush_devices(Manager *m) {
         } else {
                 struct dirent *de;
 
-                FOREACH_DIRENT_ALL(de, d, break) {
+                while ((de = readdir(d))) {
+
                         if (!dirent_is_file(de))
                                 continue;
 
@@ -1446,7 +1447,7 @@ static int bus_manager_log_shutdown(
                 p = strjoina(p, " (", m->wall_message, ").");
 
         return log_struct(LOG_NOTICE,
-                          "MESSAGE_ID=" SD_MESSAGE_SHUTDOWN_STR,
+                          LOG_MESSAGE_ID(SD_MESSAGE_SHUTDOWN),
                           p,
                           q,
                           NULL);
@@ -2464,9 +2465,13 @@ static int method_set_wall_message(
                 return 1; /* Will call us back */
 #endif // 0
 
-        r = free_and_strdup(&m->wall_message, empty_to_null(wall_message));
-        if (r < 0)
-                return log_oom();
+        if (isempty(wall_message))
+                m->wall_message = mfree(m->wall_message);
+        else {
+                r = free_and_strdup(&m->wall_message, wall_message);
+                if (r < 0)
+                        return log_oom();
+        }
 
         m->enable_wall_messages = enable_wall_messages;
 
index a7e5c01ef38a16769c5a1584a37a06cfb61c185c..5ca42b1ca2ae2c4d14cc4f73f23e25d181b3112e 100644 (file)
@@ -26,7 +26,7 @@
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "logind-inhibit.h"
 #include "mkdir.h"
 #include "parse-util.h"
index 92fa3c9c64f8eb4f749cfda1f60501dcfdfdd328..f94d7a22a12aef95209b691de7cf333cabc31d67 100644 (file)
@@ -420,7 +420,7 @@ int seat_start(Seat *s) {
                 return 0;
 
         log_struct(LOG_INFO,
-                   "MESSAGE_ID=" SD_MESSAGE_SEAT_START_STR,
+                   LOG_MESSAGE_ID(SD_MESSAGE_SEAT_START),
                    "SEAT_ID=%s", s->id,
                    LOG_MESSAGE("New seat %s.", s->id),
                    NULL);
@@ -450,7 +450,7 @@ int seat_stop(Seat *s, bool force) {
 
         if (s->started)
                 log_struct(LOG_INFO,
-                           "MESSAGE_ID=" SD_MESSAGE_SEAT_STOP_STR,
+                           LOG_MESSAGE_ID(SD_MESSAGE_SEAT_STOP),
                            "SEAT_ID=%s", s->id,
                            LOG_MESSAGE("Removed seat %s.", s->id),
                            NULL);
@@ -547,6 +547,8 @@ int seat_attach_session(Seat *s, Session *session) {
         LIST_PREPEND(sessions_by_seat, s->sessions, session);
         seat_assign_position(s, session);
 
+        seat_send_changed(s, "Sessions", NULL);
+
         /* On seats with VTs, the VT logic defines which session is active. On
          * seats without VTs, we automatically activate new sessions. */
         if (!seat_has_vts(s))
index bd2aac99a3351d3ebae4bc410d382c72fd99efe2..0799a98f2428b8eaf8946b273513043e1e1485b6 100644 (file)
@@ -592,7 +592,7 @@ int session_start(Session *s) {
                 return r;
 
         log_struct(s->class == SESSION_BACKGROUND ? LOG_DEBUG : LOG_INFO,
-                   "MESSAGE_ID=" SD_MESSAGE_SESSION_START_STR,
+                   LOG_MESSAGE_ID(SD_MESSAGE_SESSION_START),
                    "SESSION_ID=%s", s->id,
                    "USER_ID=%s", s->user->name,
                    "LEADER="PID_FMT, s->leader,
@@ -617,10 +617,12 @@ int session_start(Session *s) {
 
         /* Send signals */
         session_send_signal(s, true);
-        user_send_changed(s->user, "Display", NULL);
+        user_send_changed(s->user, "Sessions", "Display", NULL);
         if (s->seat) {
                 if (s->seat->active == s)
-                        seat_send_changed(s->seat, "ActiveSession", NULL);
+                        seat_send_changed(s->seat, "Sessions", "ActiveSession", NULL);
+                else
+                        seat_send_changed(s->seat, "Sessions", NULL);
         }
 
         return 0;
@@ -718,7 +720,7 @@ int session_finalize(Session *s) {
 
         if (s->started)
                 log_struct(s->class == SESSION_BACKGROUND ? LOG_DEBUG : LOG_INFO,
-                           "MESSAGE_ID=" SD_MESSAGE_SESSION_STOP_STR,
+                           LOG_MESSAGE_ID(SD_MESSAGE_SESSION_STOP),
                            "SESSION_ID=%s", s->id,
                            "USER_ID=%s", s->user->name,
                            "LEADER="PID_FMT, s->leader,
@@ -748,10 +750,11 @@ int session_finalize(Session *s) {
                         seat_set_active(s->seat, NULL);
 
                 seat_save(s->seat);
+                seat_send_changed(s->seat, "Sessions", NULL);
         }
 
         user_save(s->user);
-        user_send_changed(s->user, "Display", NULL);
+        user_send_changed(s->user, "Sessions", "Display", NULL);
 
         return 0;
 }
index af6392e02570ec8ac5a9985f418179ed2a383d88..987c63014f750a598e8ee9b0127740f27e8f53ea 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "alloc-util.h"
 #include "bus-util.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "logind-user.h"
 #include "logind.h"
 #include "signal-util.h"
index 304e6b512915f7ea4b00f7dabdf00737ff7b063c..c1fd75a829e553add73bcd3e0185adb67447d4ca 100644 (file)
 #include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-util.h"
+#include "cgroup-util.h"
 #include "clean-ipc.h"
 #include "conf-parser.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "fs-util.h"
 #include "hashmap.h"
 #include "label.h"
index 4fcc25a1e15718632911ba470fb853b5841951ae..4fe5ff0144f2caf3b62e263ca907bf1feec72f80 100644 (file)
@@ -29,7 +29,7 @@
 #include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-util.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "logind.h"
 //#include "special.h"
 #include "strv.h"
index 2efa78c19ff638c31f4be7d9798d9617524ca027..83b06afa3bbb121d33e60a942612f362ae9eda9b 100644 (file)
@@ -36,7 +36,7 @@
 #include "def.h"
 #include "dirent-util.h"
 #include "fd-util.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "logind.h"
 #include "selinux-util.h"
 #include "signal-util.h"
@@ -1208,15 +1208,12 @@ int main(int argc, char *argv[]) {
         log_set_target(LOG_TARGET_AUTO);
         log_set_facility(LOG_AUTH);
         log_parse_environment();
-
 #ifdef ENABLE_DEBUG_ELOGIND
         log_set_max_level(LOG_DEBUG);
         log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
 #endif // ENABLE_DEBUG_ELOGIND
-
         log_open();
 
-
         umask(0022);
 
         if (argc != 1) {
index b0f75b2a21c4941ec8fd5f81c11b55eb533bb1b1..dab082a26ee9269f69b8d895bdef72c13a090553 100644 (file)
@@ -36,7 +36,7 @@
 #include "def.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "hostname-util.h"
 #include "login-util.h"
 #include "macro.h"
index 8c60bdc1f2be77ae301b7d95a96ccde5ac87690d..ba48fb0ec5871cd1607fbb1282667e01765c741d 100644 (file)
@@ -36,7 +36,7 @@
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "fileio.h"
-#include "formats-util.h"
+#include "format-util.h"
 #include "log.h"
 #include "macro.h"
 #include "string-util.h"