Module Name:    xsrc
Committed By:   tsutsui
Date:           Mon Sep 26 14:47:53 UTC 2011

Modified Files:
        xsrc/external/mit/xf86-input-ws/dist/src: ws.c

Log Message:
Restore #ifndef __NetBSD__ portions (disabling OpenBSD specific TPANEL stuff?)
which were accidentally removed in rev 1.4:
> merge xf86-input-ws 1.3.0 from openbsd-current.

Pointed out by nonaka@, and this fixes WSMOUSEIO_SCALIBCOORDS ioctl errors
and coredumps after the driver is loaded on hpcarm W-ZERO3.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xf86-input-ws/dist/src/ws.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c
diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.6 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.7
--- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.6	Mon Sep 26 14:38:59 2011
+++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c	Mon Sep 26 14:47:53 2011
@@ -282,6 +282,7 @@ wsPreInit12(InputDriverPtr drv, InputInf
 		    pInfo->name);
 	}
 
+#ifndef __NetBSD__
 	if (priv->type == WSMOUSE_TYPE_TPANEL && priv->raw) {
 		if (ioctl(pInfo->fd, WSMOUSEIO_GCALIBCOORDS,
 			&priv->coords) != 0) {
@@ -298,12 +299,15 @@ wsPreInit12(InputDriverPtr drv, InputInf
 		priv->min_y = priv->coords.miny;
 		priv->max_y = priv->coords.maxy;
 	} else {
+#endif
 		/* in calibrated mode, coordinate space, is screen coords */
 		priv->min_x = 0;
 		priv->max_x = screenInfo.screens[priv->screen_no]->width - 1;
 		priv->min_y = 0;
 		priv->max_y = screenInfo.screens[priv->screen_no]->height - 1;
+#ifndef __NetBSD__
 	}
+#endif
 	/* Allow options to override this */
 	priv->min_x = xf86SetIntOption(pInfo->options, "MinX", priv->min_x);
 	xf86Msg(X_INFO, "%s minimum x position: %d\n",
@@ -506,6 +510,7 @@ wsDeviceOn(DeviceIntPtr pWS)
 			return !Success;
 	}
 
+#ifndef __NetBSD__
 	if (priv->type == WSMOUSE_TYPE_TPANEL) {
 		/* get calibration values */
 		if (ioctl(pInfo->fd, WSMOUSEIO_GCALIBCOORDS, &coords) != 0) {
@@ -525,6 +530,7 @@ wsDeviceOn(DeviceIntPtr pWS)
 			}
 		}
 	}
+#endif
 	priv->buffer = XisbNew(pInfo->fd,
 	    sizeof(struct wscons_event) * NUMEVENTS);
 	if (priv->buffer == NULL) {
@@ -547,6 +553,7 @@ wsDeviceOff(DeviceIntPtr pWS)
 
 	DBG(1, ErrorF("WS DEVICE OFF\n"));
 	wsmbEmuFinalize(pInfo);
+#ifndef __NetBSD__
 	if (priv->type == WSMOUSE_TYPE_TPANEL) {
 		/* Restore calibration data */
 		memcpy(&coords, &priv->coords, sizeof coords);
@@ -555,6 +562,7 @@ wsDeviceOff(DeviceIntPtr pWS)
 			    strerror(errno));
 		}
 	}
+#endif
 	if (pInfo->fd >= 0) {
 		xf86RemoveEnabledDevice(pInfo);
 		wsClose(pInfo);

Reply via email to