summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorFrederic Cambus <fcambus@cvs.openbsd.org>2020-08-05 13:50:26 +0000
committerFrederic Cambus <fcambus@cvs.openbsd.org>2020-08-05 13:50:26 +0000
commitb8f93bef5ff2f5237fd42202b520037e81fb698d (patch)
treef353a667539347e45998198ad2cecd62c37ddd00 /sys
parent2fe343881d6a04b80a187346fb59b36205fcd8cd (diff)
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@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/wscons/wsdisplay.c13
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)