chiark / gitweb /
core: downgrade unit type not supported message
[elogind.git] / src / login / logind.c
index 78220ff4dd8a81e4cdd86ce62a0f3057b8e5ba55..08a7cbc08a2afe7f18a0985aff7fde31fe96f187 100644 (file)
 #include <fcntl.h>
 #include <string.h>
 #include <unistd.h>
-#include <linux/vt.h>
-#include <sys/timerfd.h>
 
 #include "sd-daemon.h"
 #include "strv.h"
 #include "conf-parser.h"
-#include "mkdir.h"
 #include "bus-util.h"
 #include "bus-error.h"
 #include "logind.h"
@@ -290,7 +287,7 @@ static int manager_enumerate_seats(Manager *m) {
                 if (errno == ENOENT)
                         return 0;
 
-                log_error("Failed to open /run/systemd/seats: %m");
+                log_error_errno(errno, "Failed to open /run/systemd/seats: %m");
                 return -errno;
         }
 
@@ -327,7 +324,7 @@ static int manager_enumerate_linger_users(Manager *m) {
                 if (errno == ENOENT)
                         return 0;
 
-                log_error("Failed to open /var/lib/systemd/linger/: %m");
+                log_error_errno(errno, "Failed to open /var/lib/systemd/linger/: %m");
                 return -errno;
         }
 
@@ -363,7 +360,7 @@ static int manager_enumerate_users(Manager *m) {
                 if (errno == ENOENT)
                         return 0;
 
-                log_error("Failed to open /run/systemd/users: %m");
+                log_error_errno(errno, "Failed to open /run/systemd/users: %m");
                 return -errno;
         }
 
@@ -404,7 +401,7 @@ static int manager_enumerate_sessions(Manager *m) {
                 if (errno == ENOENT)
                         return 0;
 
-                log_error("Failed to open /run/systemd/sessions: %m");
+                log_error_errno(errno, "Failed to open /run/systemd/sessions: %m");
                 return -errno;
         }
 
@@ -451,7 +448,7 @@ static int manager_enumerate_inhibitors(Manager *m) {
                 if (errno == ENOENT)
                         return 0;
 
-                log_error("Failed to open /run/systemd/inhibit: %m");
+                log_error_errno(errno, "Failed to open /run/systemd/inhibit: %m");
                 return -errno;
         }
 
@@ -568,7 +565,7 @@ static int manager_reserve_vt(Manager *m) {
 
                 /* Don't complain on VT-less systems */
                 if (errno != ENOENT)
-                        log_warning("Failed to pin reserved VT: %m");
+                        log_warning_errno(errno, "Failed to pin reserved VT: %m");
                 return -errno;
         }
 
@@ -753,7 +750,7 @@ static int manager_connect_console(Manager *m) {
                 if (errno == ENOENT)
                         return 0;
 
-                log_error("Failed to open /sys/class/tty/tty0/active: %m");
+                log_error_errno(errno, "Failed to open /sys/class/tty/tty0/active: %m");
                 return -errno;
         }