summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-10-11 02:10:48 +0200
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-13 11:01:29 +1030
commit8c332a836783b4f18b992253f4a94b694c9d0cf1 (patch)
tree5e510726a015d2037b354158672dc088823a08ec
parent91e30bb07cadb41c99b0515d8ecb49f7b045e90c (diff)
downloadxorg-driver-xf86-input-evdev-8c332a836783b4f18b992253f4a94b694c9d0cf1.tar.gz
Set pInfo->fd to -1 on DEVICE_CLOSE
This allows the reopen logic to kick in later. DEVICE_CLOSE gets called on regen, so without this we'd keep a stale file descriptor in pInfo->fd in subsequent sessions. Debian bug#496101 (http://bugs.debian.org/496101) (cherry picked from commit b0b6399023bcdbb3337027f85c8da42d8b18c983)
-rw-r--r--src/evdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index b12f2ff..6958578 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -986,8 +986,10 @@ EvdevProc(DeviceIntPtr device, int what)
case DEVICE_CLOSE:
xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
- if (pInfo->fd != -1)
+ if (pInfo->fd != -1) {
close(pInfo->fd);
+ pInfo->fd = -1;
+ }
break;
}