From: Zbigniew Jędrzejewski-Szmek Date: Wed, 9 Jan 2019 13:08:29 +0000 (+0100) Subject: logind: do not pass negative number to strerror X-Git-Tag: archive/raspbian/240-6+rpi1^2~34 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fef0f50545f764ef421b62b4881477dea8c544ce;p=systemd.git logind: do not pass negative number to strerror (cherry picked from commit 65641b3cdc12923320879bac6f071eb45a70e79c) (cherry picked from commit 8f8f3191d33ca8583fe62a9e6268e2a914a7b2c0) Gbp-Pq: Name logind-do-not-pass-negative-number-to-strerror.patch --- diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index c758ffd5..a6d88f8e 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -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; }