diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index f3ffa837a7f..7c5958ec65c 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +115,10 @@ static void (*current_saver)(sc_softc_t *, int) = none_saver; static bios_values_t bios_value; +static int enable_panic_key; +SYSCTL_INT(_machdep, OID_AUTO, enable_panic_key, CTLFLAG_RW, &enable_panic_key, + 0, ""); + #define SC_MOUSE 128 #define SC_CONSOLECTL 255 @@ -3738,6 +3743,11 @@ next_code: #endif /* SC_DISABLE_DDBKEY */ break; + case PNC: + if (enable_panic_key) + panic("Forced by the panic key"); + break; + case NEXT: this_scr = scp->index; for (i = (this_scr - sc->first_vty + 1)%sc->vtys;