From: Michal Schmidt Date: Sat, 3 Dec 2011 00:36:05 +0000 (+0100) Subject: path: use %m instead of strerror(errno) X-Git-Tag: v38~177 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=768147d13d0877a4c3e5f6f986c3064de62ff4f1;p=systemd path: use %m instead of strerror(errno) and strerror(-errno) was just wrong. --- diff --git a/src/path.c b/src/path.c index f15c9214..142fd2d8 100644 --- a/src/path.c +++ b/src/path.c @@ -556,7 +556,7 @@ static void path_fd_event(Unit *u, int fd, uint32_t events, Watch *w) { } if (ioctl(fd, FIONREAD, &l) < 0) { - log_error("FIONREAD failed: %s", strerror(errno)); + log_error("FIONREAD failed: %m"); goto fail; } @@ -568,7 +568,7 @@ static void path_fd_event(Unit *u, int fd, uint32_t events, Watch *w) { } if ((k = read(fd, buf, l)) < 0) { - log_error("Failed to read inotify event: %s", strerror(-errno)); + log_error("Failed to read inotify event: %m"); goto fail; }