[sheepdog] [PATCH] lib/event: fix and unify error message

Ruoyu liangry at ucweb.com
Thu Jul 10 12:15:54 CEST 2014


Signed-off-by: Ruoyu <liangry at ucweb.com>
---
 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.8.3.2





More information about the sheepdog mailing list