diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-01 03:43:13 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-01 03:43:13 +0000 |
commit | 38b04d62924eb4ea0b5f768f62e7cfb0282a13b9 (patch) | |
tree | a51b90f171f81bce7e4956d82109af7eb3dd2fd3 /sys/dev/wscons/wskbd.c | |
parent | f94a5d516cec609ccaaefe698d289953ceb782ad (diff) |
Add CTRL-ALT-DEL machine reset support, like PCVT had, enabled by the
machdep.kbdreset sysctl as configured in /etc/sysctl.conf.
Diffstat (limited to 'sys/dev/wscons/wskbd.c')
-rw-r--r-- | sys/dev/wscons/wskbd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 40a99327a9c..53382692e25 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbd.c,v 1.9 2001/02/11 19:14:06 aaron Exp $ */ +/* $OpenBSD: wskbd.c,v 1.10 2001/03/01 03:43:12 aaron Exp $ */ /* $NetBSD: wskbd.c,v 1.38 2000/03/23 07:01:47 thorpej Exp $ */ /* @@ -241,6 +241,8 @@ struct cfattach wskbd_ca = { extern struct cfdriver wskbd_cd; +extern int kbd_reset; + #ifndef WSKBD_DEFAULT_BELL_PITCH #define WSKBD_DEFAULT_BELL_PITCH 1500 /* 1500Hz */ #endif @@ -1391,6 +1393,12 @@ internal_command(sc, type, ksym, ksym2) case KS_Cmd_ResetClose: wsdisplay_reset(sc->sc_displaydv, WSDISPLAY_RESETCLOSE); return (1); + case KS_Cmd_KbdReset: + if (kbd_reset == 1) { + kbd_reset = 0; + psignal(initproc, SIGUSR1); + } + return (1); case KS_Cmd_BacklightOn: case KS_Cmd_BacklightOff: case KS_Cmd_BacklightToggle: |