summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-12-21 20:16:36 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-12-21 20:16:36 +0000
commite6f2cbe701753699fbdde1ab1bf535e839481ba0 (patch)
tree4b7ae8963766fd9ca62193811564f69e172ab4ae /sys/dev
parentb69e2f1d5297e16abd52798283c22900870ae240 (diff)
on i386 and amd64, let ctrl-alt-delete let you enter ddb if ddb.console=1
and machdep.kbdreset=2. "i like it" deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/wscons/wskbd.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index d728335f4ac..9e644f6272b 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wskbd.c,v 1.58 2007/09/11 13:39:34 gilles Exp $ */
+/* $OpenBSD: wskbd.c,v 1.59 2008/12/21 20:16:35 dlg Exp $ */
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
/*
@@ -1465,9 +1465,21 @@ internal_command(struct wskbd_softc *sc, u_int *type, keysym_t ksym,
return (1);
#if defined(__i386__) || defined(__amd64__)
case KS_Cmd_KbdReset:
- if (kbd_reset == 1) {
+ switch (kbd_reset) {
+#ifdef DDB
+ case 2:
+ if (sc->sc_isconsole && db_console)
+ Debugger();
+ /* discard this key (ddb discarded command modifiers) */
+ *type = WSCONS_EVENT_KEY_UP;
+ break;
+#endif
+ case 1:
kbd_reset = 0;
psignal(initproc, SIGUSR1);
+ break;
+ default:
+ break;
}
return (1);
#endif