diff options
author | Peter Osterlund <petero2@telia.com> | 2005-02-19 10:55:41 +0100 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:03:08 +0200 |
commit | f51d8cc79b5f7d3c9c5d9c5838398af8c81c1f2c (patch) | |
tree | f46cd3c1dadbb020eaf173a8ad8019f21e23a6db /eventcomm.c | |
parent | 2d7e5680f765b4c594d048981e6cf29fb8bd29cd (diff) |
Made the event auto device detection work even if some
/dev/input/event nodes are missing, which can happen when using a udev
based system.
Diffstat (limited to 'eventcomm.c')
-rw-r--r-- | eventcomm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/eventcomm.c b/eventcomm.c index ea48a72..36e4cd1 100644 --- a/eventcomm.c +++ b/eventcomm.c @@ -235,6 +235,7 @@ EventAutoDevProbe(LocalDevicePtr local) the psaux protocol and the given device from XF86Config */ int i; Bool have_evdev = FALSE; + int noent_cnt = 0; for (i = 0; ; i++) { char fname[64]; @@ -245,11 +246,15 @@ EventAutoDevProbe(LocalDevicePtr local) SYSCALL(fd = open(fname, O_RDONLY)); if (fd < 0) { if (errno == ENOENT) { - break; + if (++noent_cnt >= 10) + break; + else + continue; } else { continue; } } + noent_cnt = 0; have_evdev = TRUE; is_touchpad = event_query_is_touchpad(fd); SYSCALL(close(fd)); |