summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Shadchin <alexandr.shadchin@gmail.com>2011-04-09 17:45:10 +0600
committerPeter Hutterer <peter.hutterer@who-t.net>2011-04-18 13:04:19 +1000
commit7762de65e153790ee9f63903964d168a6680d815 (patch)
tree20a95051f57ae68f34f60d9e4772605a77a7fa30
parentb3d2164a0361f636bfe77b51456bee9213af4f13 (diff)
Simplify auto-detect mouse for WSCONS_SUPPORT
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Matthieu Herrbb <matthieu.herrb@laas.fr> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--hw/xfree86/common/xf86Configure.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index c712df72c..975266943 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -63,6 +63,9 @@ static char *DFLT_MOUSE_PROTO = "auto";
#elif defined(linux)
static char DFLT_MOUSE_DEV[] = "/dev/input/mice";
static char DFLT_MOUSE_PROTO[] = "auto";
+#elif defined(WSCONS_SUPPORT)
+static char *DFLT_MOUSE_DEV = "/dev/wsmouse";
+static char *DFLT_MOUSE_PROTO = "wsmouse";
#else
static char *DFLT_MOUSE_DEV = "/dev/mouse";
static char *DFLT_MOUSE_PROTO = "auto";
@@ -154,16 +157,6 @@ configureInputSection (void)
/* Crude mechanism to auto-detect mouse (os dependent) */
{
int fd;
-#ifdef WSCONS_SUPPORT
- fd = open("/dev/wsmouse", 0);
- if (fd >= 0) {
- DFLT_MOUSE_DEV = "/dev/wsmouse";
- DFLT_MOUSE_PROTO = "wsmouse";
- close(fd);
- } else {
- ErrorF("cannot open /dev/wsmouse\n");
- }
-#endif
fd = open(DFLT_MOUSE_DEV, 0);
if (fd != -1) {