Blame 0057-path-use-m-instead-of-strerror-errno.patch
|
|
e43452d |
From 5971b6afa801868d4bf790727dec254588832d70 Mon Sep 17 00:00:00 2001
|
|
|
e43452d |
From: Michal Schmidt <mschmidt@redhat.com>
|
|
|
e43452d |
Date: Sat, 3 Dec 2011 01:36:05 +0100
|
|
|
f1996ec |
Subject: [PATCH] path: use %m instead of strerror(errno)
|
|
|
e43452d |
|
|
|
e43452d |
and strerror(-errno) was just wrong.
|
|
|
e43452d |
(cherry picked from commit 768147d13d0877a4c3e5f6f986c3064de62ff4f1)
|
|
|
e43452d |
---
|
|
|
e43452d |
src/path.c | 4 ++--
|
|
|
e43452d |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
e43452d |
|
|
|
e43452d |
diff --git a/src/path.c b/src/path.c
|
|
|
e43452d |
index f15c921..142fd2d 100644
|
|
|
e43452d |
--- a/src/path.c
|
|
|
e43452d |
+++ b/src/path.c
|
|
|
e43452d |
@@ -556,7 +556,7 @@ static void path_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
|
|
|
e43452d |
}
|
|
|
e43452d |
|
|
|
e43452d |
if (ioctl(fd, FIONREAD, &l) < 0) {
|
|
|
e43452d |
- log_error("FIONREAD failed: %s", strerror(errno));
|
|
|
e43452d |
+ log_error("FIONREAD failed: %m");
|
|
|
e43452d |
goto fail;
|
|
|
e43452d |
}
|
|
|
e43452d |
|
|
|
e43452d |
@@ -568,7 +568,7 @@ static void path_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
|
|
|
e43452d |
}
|
|
|
e43452d |
|
|
|
e43452d |
if ((k = read(fd, buf, l)) < 0) {
|
|
|
e43452d |
- log_error("Failed to read inotify event: %s", strerror(-errno));
|
|
|
e43452d |
+ log_error("Failed to read inotify event: %m");
|
|
|
e43452d |
goto fail;
|
|
|
e43452d |
}
|
|
|
e43452d |
|
|
|
e43452d |
--
|
|
|
e43452d |
1.7.7.5
|
|
|
e43452d |
|