diff options
author | 2020-08-05 13:50:25 +0000 | |
---|---|---|
committer | 2020-08-05 13:50:25 +0000 | |
commit | 7205f19657a09424fcb870e2eb2cc2b6e7801eed (patch) | |
tree | c86a09716dcedddd0a60b87b78e7a0b9e325e4e4 | |
parent | Document the p argument of vgonel(9) and vrecycle(9). (diff) | |
download | wireguard-openbsd-7205f19657a09424fcb870e2eb2cc2b6e7801eed.tar.xz wireguard-openbsd-7205f19657a09424fcb870e2eb2cc2b6e7801eed.zip |
Allow the WSDISPLAYIO_GETSCREENTYPE ioctl on the tty*cfg device, passing
it back to tty*0.
This is needed to restore working defaults in wsfontload(8).
OK jcs@, mpi@
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 00b2baf236d..82daa85dda3 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.141 2020/05/25 09:55:49 jsg Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.142 2020/08/05 13:50:25 fcambus Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -1046,10 +1046,15 @@ wsdisplayioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) #endif if (ISWSDISPLAYCTL(dev)) { - if (cmd != WSDISPLAYIO_GTYPE) + switch (cmd) { + case WSDISPLAYIO_GTYPE: + case WSDISPLAYIO_GETSCREENTYPE: + /* pass to the first screen */ + dev = makedev(major(dev), WSDISPLAYMINOR(unit, 0)); + break; + default: return (wsdisplay_cfg_ioctl(sc, cmd, data, flag, p)); - /* pass WSDISPLAYIO_GTYPE to the first screen */ - dev = makedev(major(dev), WSDISPLAYMINOR(unit, 0)); + } } if (WSDISPLAYSCREEN(dev) >= WSDISPLAY_MAXSCREEN) |