summaryrefslogtreecommitdiffstats
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 10b4529..cc2e9d9 100644
--- a/utils.c
+++ b/utils.c
@@ -21,6 +21,7 @@
#define LOG_TAG "RIL"
#include <ctype.h>
+#include <errno.h>
#include <stdlib.h>
#include <string.h>
@@ -229,8 +230,12 @@ int eventfd_recv(int fd, eventfd_t *event)
int rc;
rc = eventfd_read(fd, event);
- if (rc < 0)
+ if (rc < 0) {
+ rc = errno;
+ RIL_LOGE("%s: eventfd_read error %d: %s", __func__,
+ rc, strerror(rc));
return -1;
+ }
return 0;
}