[sheepdog] [PATCH stable-0.8 3/3] lib/event: fix and unify error message

Hitoshi Mitake mitake.hitoshi at gmail.com
Tue Jul 29 03:32:02 CEST 2014


From: Ruoyu <liangry at ucweb.com>

Signed-off-by: Ruoyu <liangry at ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 lib/event.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/event.c b/lib/event.c
index 88078f4..eb55fff 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -114,7 +114,7 @@ int register_event_prio(int fd, event_handler_t h, void *data, int prio)
 
 	ret = epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ev);
 	if (ret) {
-		sd_err("failed to add epoll event: %m");
+		sd_err("failed to add epoll event for fd %d: %m", fd);
 		free(ei);
 	} else
 		rb_insert(&events_tree, ei, rb, event_cmp);
@@ -163,7 +163,7 @@ int modify_event(int fd, unsigned int new_events)
 
 	ret = epoll_ctl(efd, EPOLL_CTL_MOD, fd, &ev);
 	if (ret) {
-		sd_err("failed to delete epoll event for fd %d: %m", fd);
+		sd_err("failed to modify epoll event for fd %d: %m", fd);
 		return 1;
 	}
 	return 0;
-- 
1.9.1




More information about the sheepdog mailing list