diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-03-03 12:01:18 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-03-03 12:01:18 +0000 |
commit | 2653893695d770941ae788dc69e44e65feed310f (patch) | |
tree | 8c9f94847a031c11ded1ce01ec3df4b9d27f5dae /sys/arch/i386/isa/pccons.c | |
parent | bee45b6272f7d1fee8afd7de1703512c128927f0 (diff) |
Add a little ioctl at 4am to set the screen blanking.
Diffstat (limited to 'sys/arch/i386/isa/pccons.c')
-rw-r--r-- | sys/arch/i386/isa/pccons.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c index 2c53a874f8a..cc9211566b5 100644 --- a/sys/arch/i386/isa/pccons.c +++ b/sys/arch/i386/isa/pccons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccons.c,v 1.33 1996/12/29 12:25:59 graichen Exp $ */ +/* $OpenBSD: pccons.c,v 1.34 1997/03/03 12:01:15 downsj Exp $ */ /* $NetBSD: pccons.c,v 1.99.4.1 1996/06/04 20:03:53 cgd Exp $ */ /*- @@ -94,6 +94,7 @@ static u_char lock_state = 0x00, /* all off */ static u_short cursor_shape = 0xffff, /* don't update until set by user */ old_cursor_shape = 0xffff; static pccons_keymap_t scan_codes[KB_NUM_KEYS];/* keyboard translation table */ +static int pc_blank = 300; #ifdef XSERVER int pc_xmode = 0; #endif @@ -727,6 +728,10 @@ pcioctl(dev, cmd, data, flag, p) return EINVAL; bcopy(scan_codes, data, sizeof(pccons_keymap_t[KB_NUM_KEYS])); return 0; + case CONSOLE_SET_BLANK: + pc_blank = *((int *)data); + screen_restore(0); + return 0; default: return ENOTTY; } @@ -1013,8 +1018,8 @@ screen_restore(perm) bcopy(screen_backup, Crtat, ROW*COL*CHR); screen_saved = 0; } - if (! perm) - timeout(screen_blank, NULL, 300*hz); + if (!perm && (pc_blank > 0)) + timeout(screen_blank, NULL, pc_blank * hz); } /* |