summaryrefslogtreecommitdiff
path: root/src/login/logind-seat.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-07-03 23:56:17 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-07-05 02:43:56 +0900
commit4bbccb02eaee35e20d3031e7ba4b3d08631ce934 (patch)
tree27fed6568b9faa5a2586c5929159b79a4002c294 /src/login/logind-seat.c
parent7fa6223f67662e8d5ee26092240b4e1d091a69f5 (diff)
downloadsystemd-4bbccb02eaee35e20d3031e7ba4b3d08631ce934.tar.gz
tree-wide: introduce strerror_safe()
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r--src/login/logind-seat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index dc578adf63..c3ad5f9b5b 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -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;
}