From f583cb7f6cf5d5d43c74133d8b9490f6bc2f825e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Dec 2013 17:26:40 +1000 Subject: [PATCH] libinput_dispatch: return negative error number on failure Might as well tell the caller what went wrong without having to worry about errno. Signed-off-by: Peter Hutterer --- src/libinput.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libinput.c b/src/libinput.c index b7dc30b8..b54f57ce 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -22,6 +22,7 @@ #include "config.h" +#include #include #include #include @@ -212,7 +213,7 @@ libinput_dispatch(struct libinput *libinput) count = epoll_wait(libinput->epoll_fd, ep, ARRAY_LENGTH(ep), 0); if (count < 0) - return -1; + return -errno; for (i = 0; i < count; ++i) { source = ep[i].data.ptr;