1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

logind: do not pass negative number to strerror

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-01-09 14:08:29 +01:00 committed by Yu Watanabe
parent a685c049c0
commit 65641b3cdc

View File

@ -376,7 +376,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(errno) : "EOF");
return k < 0 ? -errno : -EIO;
}