summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2004-03-09 22:41:57 +0000
committermiod <miod@openbsd.org>2004-03-09 22:41:57 +0000
commite9c2ed53a11778e643a27e64f3942c7d8d3aaa0d (patch)
tree6a418e673cae55316abf74ea56330d352cc0a38f
parentscratch the -beta part (diff)
downloadwireguard-openbsd-e9c2ed53a11778e643a27e64f3942c7d8d3aaa0d.tar.xz
wireguard-openbsd-e9c2ed53a11778e643a27e64f3942c7d8d3aaa0d.zip
Allow the screen blanker to be disabled; PR#3123
-rw-r--r--sys/dev/wscons/wsdisplay.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 5d61b70df4d..4c0738a442f 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.52 2003/10/03 16:44:51 miod Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.53 2004/03/09 22:41:57 miod Exp $ */
/* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
@@ -1151,11 +1151,18 @@ wsdisplay_internal_ioctl(sc, scr, cmd, data, flag, p)
return (0);
case WSDISPLAYIO_SBURNER:
- error = EINVAL;
- if (d->flags & (WSDISPLAY_BURN_VBLANK | WSDISPLAY_BURN_KBD |
- WSDISPLAY_BURN_MOUSE | WSDISPLAY_BURN_OUTPUT)) {
+ if (d->flags & ~(WSDISPLAY_BURN_VBLANK | WSDISPLAY_BURN_KBD |
+ WSDISPLAY_BURN_MOUSE | WSDISPLAY_BURN_OUTPUT))
+ error = EINVAL;
+ else {
error = 0;
sc->sc_burnflags = d->flags;
+ /* disable timeout if necessary */
+ if ((sc->sc_burnflags & (WSDISPLAY_BURN_OUTPUT |
+ WSDISPLAY_BURN_KBD | WSDISPLAY_BURN_MOUSE)) == 0) {
+ if (sc->sc_burnout)
+ timeout_del(&sc->sc_burner);
+ }
}
if (d->on) {
error = 0;