diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-03 23:56:17 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-05 02:43:56 +0900 |
commit | 4bbccb02eaee35e20d3031e7ba4b3d08631ce934 (patch) | |
tree | 27fed6568b9faa5a2586c5929159b79a4002c294 /src/login/logind-seat.c | |
parent | 7fa6223f67662e8d5ee26092240b4e1d091a69f5 (diff) | |
download | systemd-4bbccb02eaee35e20d3031e7ba4b3d08631ce934.tar.gz |
tree-wide: introduce strerror_safe()
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r-- | src/login/logind-seat.c | 3 |
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; } |