1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-07-03 02:20:33 -04:00
ports/x11-drivers/xf86-input-hyperpen/files/patch-git_04_6d660b0
Baptiste Daroussin 3af560a8a8 Import few patches from upstream to allow building with newer xorg
Note that those drivers are barely maintained and might disappear in the futur

PR:		216273
Submitted by:	matthew@reztek.cz
2017-01-23 22:32:10 +00:00

29 lines
942 B
Text

From 6d660b0439973d2ee0c550e3413d75bd57763243 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 19 Jul 2011 12:42:43 +1000
Subject: Test device in PreInit, fail if it cannot be opened.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/xf86HyperPen.c b/src/xf86HyperPen.c
index 320add5..8b9011e 100644
--- src/xf86HyperPen.c
+++ src/xf86HyperPen.c
@@ -833,6 +833,14 @@ xf86HypInit(InputDriverPtr drv,
xf86Msg (X_ERROR, "%s: No Device specified.\n", pInfo->name);
rc = BadMatch;
goto SetupProc_fail;
+ } else {
+ pInfo->fd = xf86OpenSerial(pInfo->options);
+ if (pInfo->fd == -1) {
+ xf86Msg (X_ERROR, "%s: cannot open device '%s'\n", pInfo->name, priv->hypDevice);
+ return BadValue;
+ }
+ xf86CloseSerial(pInfo->fd);
+ pInfo->fd = -1;
}
pInfo->private = priv;
--
cgit v0.10.2