chiark / gitweb /
remove unused includes
[elogind.git] / src / login / user-sessions.c
index ca5de41f40277113244fc118f60e0e703b780999..1c31769fde9b447904987a7fef476589ff21e113 100644 (file)
@@ -19,7 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <string.h>
 #include <unistd.h>
 #include <errno.h>
 
@@ -44,7 +43,7 @@ int main(int argc, char*argv[]) {
                 int r = 0;
 
                 if (unlink("/run/nologin") < 0 && errno != ENOENT) {
-                        log_error("Failed to remove /run/nologin file: %m");
+                        log_error_errno(errno, "Failed to remove /run/nologin file: %m");
                         r = -errno;
                 }
 
@@ -55,7 +54,7 @@ int main(int argc, char*argv[]) {
                          * exist), don't complain */
 
                         if (errno != EROFS || access("/etc/nologin", F_OK) >= 0) {
-                                log_error("Failed to remove /etc/nologin file: %m");
+                                log_error_errno(errno, "Failed to remove /etc/nologin file: %m");
                                 return EXIT_FAILURE;
                         }
                 }
@@ -68,7 +67,7 @@ int main(int argc, char*argv[]) {
 
                 r = write_string_file_atomic("/run/nologin", "System is going down.");
                 if (r < 0) {
-                        log_error("Failed to create /run/nologin: %s", strerror(-r));
+                        log_error_errno(r, "Failed to create /run/nologin: %m");
                         return EXIT_FAILURE;
                 }