touchpad: use log_error instead of fprintf
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 25 Mar 2014 01:43:52 +0000 (11:43 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 25 Mar 2014 06:37:42 +0000 (16:37 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad-tap.c

index bc7acbd0a4fd84d41e68e85497c7e34683b6489c..35982f7392cea6d251b125a6df1cc91131b99921 100644 (file)
 #endif
 
 #include <assert.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
 #include <sys/timerfd.h>
@@ -559,7 +561,7 @@ tp_tap_timeout_handler(void *data)
                /* This will only happen if the application made the fd
                 * non-blocking, but this function should only be called
                 * upon the timeout, so lets continue anyway. */
-               fprintf(stderr, "timerfd read error: %m\n");
+               log_error("timerfd read error: %s\n", strerror(errno));
 
        clock_gettime(CLOCK_MONOTONIC, &ts);
        now = ts.tv_sec * 1000 + ts.tv_nsec / 1000000;