diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-09 22:41:58 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-09 22:41:58 +0000 |
commit | c5341889bbdfe65b8026f18d2d1ec852f9deda25 (patch) | |
tree | 4e98e358614b6c9b4ea5a894005a592c87c4accc /sys/dev/wscons/wsdisplay.c | |
parent | e071ce279d4d06885154dedb1d0c307933c10afe (diff) |
Allow the screen blanker to be disabled; PR#3123
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 15 |
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; |