summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2018-01-24 13:19:10 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2018-01-30 13:37:57 +1000
commitab1d9adfd34b351190bb10805c4e6b5a5aecd5de (patch)
treeee9d68b6021f808cdb11ad27dbdd6b028c921539
parent192fdb06905f0f190e3a0e258919676934e6633c (diff)
Print cause of a failed open(..) call
This is quite helpful for debugging. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index cffed7f..3d7b6f0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2487,7 +2487,7 @@ EvdevOpenDevice(InputInfoPtr pInfo)
}
if (pInfo->fd < 0) {
- xf86IDrvMsg(pInfo, X_ERROR, "Unable to open evdev device \"%s\".\n", device);
+ xf86IDrvMsg(pInfo, X_ERROR, "Unable to open evdev device \"%s\" (%s).\n", device, strerror(errno));
return BadValue;
}