diff options
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; |