summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2005-06-01 18:50:30 +0000
committermiod <miod@openbsd.org>2005-06-01 18:50:30 +0000
commit8c906d56e4df94b15a60092c7371608a90d25d5e (patch)
treea0e51d78cf2c82b3df63b29daa1db8099ac025c8
parentsync (diff)
downloadwireguard-openbsd-8c906d56e4df94b15a60092c7371608a90d25d5e.tar.xz
wireguard-openbsd-8c906d56e4df94b15a60092c7371608a90d25d5e.zip
Do not kill the event sink when closing a wsmouse device opened in write-only
mode, thus only been used to issue ioctls. This chunk was lost in r1.14; reported by Douglas Santos.
-rw-r--r--sys/dev/wscons/wsmouse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c
index 2866d67ef31..a40dbc16719 100644
--- a/sys/dev/wscons/wsmouse.c
+++ b/sys/dev/wscons/wsmouse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsmouse.c,v 1.15 2005/05/18 21:31:27 miod Exp $ */
+/* $OpenBSD: wsmouse.c,v 1.16 2005/06/01 18:50:30 miod Exp $ */
/* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */
/*
@@ -506,6 +506,9 @@ wsmouseclose(dev_t dev, int flags, int mode, struct proc *p)
(struct wsmouse_softc *)wsmouse_cd.cd_devs[minor(dev)];
struct wseventvar *evar = sc->sc_base.me_evp;
+ if ((flags & (FREAD | FWRITE)) == FWRITE)
+ return (0); /* see wsmouseopen() */
+
if (evar == NULL)
/* not open for read */
return (0);