mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
logind: do not pass negative number to strerror
This commit is contained in:
parent
a685c049c0
commit
65641b3cdc
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user