diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wscons/wskbd.c | 9 | ||||
-rw-r--r-- | sys/dev/wscons/wsmouse.c | 9 | ||||
-rw-r--r-- | sys/dev/wscons/wsmux.c | 9 |
3 files changed, 24 insertions, 3 deletions
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 7cbe9a06663..a90917605ad 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbd.c,v 1.93 2018/11/20 19:00:13 anton Exp $ */ +/* $OpenBSD: wskbd.c,v 1.94 2018/11/20 19:33:44 anton Exp $ */ /* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */ /* @@ -957,6 +957,13 @@ wskbd_do_ioctl_sc(struct wskbd_softc *sc, u_long cmd, caddr_t data, int flag, sc->sc_base.me_evp->async = *(int *)data != 0; return (0); + case TIOCGPGRP: + evar = sc->sc_base.me_evp; + if (evar == NULL) + return (EINVAL); + *(int *)data = -sigio_getown(&evar->sigio); + return (0); + case TIOCSPGRP: if (*(int *)data < 0) return (EINVAL); diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index e26cad28f70..981b8c09d18 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmouse.c,v 1.49 2018/11/20 19:00:13 anton Exp $ */ +/* $OpenBSD: wsmouse.c,v 1.50 2018/11/20 19:33:44 anton Exp $ */ /* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */ /* @@ -497,6 +497,13 @@ wsmouse_do_ioctl(struct wsmouse_softc *sc, u_long cmd, caddr_t data, int flag, sc->sc_base.me_evp->async = *(int *)data != 0; return (0); + case TIOCGPGRP: + evar = sc->sc_base.me_evp; + if (evar == NULL) + return (EINVAL); + *(int *)data = -sigio_getown(&evar->sigio); + return (0); + case TIOCSPGRP: if (*(int *)data < 0) return (EINVAL); diff --git a/sys/dev/wscons/wsmux.c b/sys/dev/wscons/wsmux.c index 16b57c880d6..b85495c605b 100644 --- a/sys/dev/wscons/wsmux.c +++ b/sys/dev/wscons/wsmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmux.c,v 1.34 2018/11/20 19:00:13 anton Exp $ */ +/* $OpenBSD: wsmux.c,v 1.35 2018/11/20 19:33:44 anton Exp $ */ /* $NetBSD: wsmux.c,v 1.37 2005/04/30 03:47:12 augustss Exp $ */ /* @@ -470,6 +470,13 @@ wsmux_do_ioctl(struct device *dv, u_long cmd, caddr_t data, int flag, return (EINVAL); evar->async = *(int *)data != 0; return (0); + case TIOCGPGRP: + DPRINTF(("%s: TIOCGPGRP\n", sc->sc_base.me_dv.dv_xname)); + evar = sc->sc_base.me_evp; + if (evar == NULL) + return (EINVAL); + *(int *)data = -sigio_getown(&evar->sigio); + return (0); case TIOCSPGRP: DPRINTF(("%s: TIOCSPGRP\n", sc->sc_base.me_dv.dv_xname)); if (*(int *)data < 0) |