]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/login/logind-seat.c
tree-wide: introduce strerror_safe()
[thirdparty/systemd.git] / src / login / logind-seat.c
index dc578adf6383368d6c86330a9686a2685986aba6..c3ad5f9b5b00c6af1ea4e8cee00ce3e708b700f8 100644 (file)
@@ -9,6 +9,7 @@
 #include "sd-messages.h"
 
 #include "alloc-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "format-util.h"
@@ -377,7 +378,7 @@ int seat_read_active_vt(Seat *s) {
 
         k = read(s->manager->console_active_fd, t, sizeof(t)-1);
         if (k <= 0) {
-                log_error("Failed to read current console: %s", k < 0 ? strerror(errno) : "EOF");
+                log_error("Failed to read current console: %s", k < 0 ? strerror_safe(errno) : "EOF");
                 return k < 0 ? -errno : -EIO;
         }