aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/linux
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-04 15:41:28 +0000
committermarha <marha@users.sourceforge.net>2010-11-04 15:41:28 +0000
commit41c64098a90b4e974d5005a1619472f2e8a64ea1 (patch)
treedf231908c0c9c03bc3af2bb1f47b8667b7dd567c /xorg-server/hw/kdrive/linux
parent135e2e73bbe7155901a651c38b772e7b4547f39c (diff)
downloadvcxsrv-41c64098a90b4e974d5005a1619472f2e8a64ea1.tar.gz
vcxsrv-41c64098a90b4e974d5005a1619472f2e8a64ea1.tar.bz2
vcxsrv-41c64098a90b4e974d5005a1619472f2e8a64ea1.zip
xserver git update 4/11/2010
Diffstat (limited to 'xorg-server/hw/kdrive/linux')
-rw-r--r--xorg-server/hw/kdrive/linux/tslib.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/xorg-server/hw/kdrive/linux/tslib.c b/xorg-server/hw/kdrive/linux/tslib.c
index ee0f779f3..8d6007390 100644
--- a/xorg-server/hw/kdrive/linux/tslib.c
+++ b/xorg-server/hw/kdrive/linux/tslib.c
@@ -117,15 +117,22 @@ TslibEnable (KdPointerInfo *pi)
pi->path = strdup("/dev/input/touchscreen0");
ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
}
+
private->tsDev = ts_open(pi->path, 0);
- private->fd = ts_fd(private->tsDev);
- if (!private->tsDev || ts_config(private->tsDev) || private->fd < 0) {
+ if (!private->tsDev) {
ErrorF("[tslib/TslibEnable] failed to open %s\n", pi->path);
- if (private->fd >= 0)
- close(private->fd);
return BadAlloc;
}
+ if (ts_config(private->tsDev)) {
+ ErrorF("[tslib/TslibEnable] failed to load configuration\n");
+ ts_close(private->tsDev);
+ private->tsDev = NULL;
+ return BadValue;
+ }
+
+ private->fd = ts_fd(private->tsDev);
+
KdRegisterFd(private->fd, TsRead, pi);
return Success;