X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fsysrq.c;h=c9688f111a7de71220ced815b9c463f097e58d3b;hb=70790a4b5cd6c0291e5b1a2836e2832d46036ac6;hp=da52bff37f97dc08c1a2ae79f1a4e9d9dba4aec8;hpb=413ba3004a4036bb5d6e52d2faa2b19cb13561dc;p=linux-2.6.git diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index da52bff37..c9688f111 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -107,6 +107,17 @@ static struct sysrq_key_op sysrq_reboot_op = { .action_msg = "Resetting", }; +/* crash sysrq handler */ +static void sysrq_handle_crash(int key, struct pt_regs *pt_regs, + struct tty_struct *tty) { + *( (char *) 0) = 0; +} +static struct sysrq_key_op sysrq_crash_op = { + handler: sysrq_handle_crash, + help_msg: "Crash", + action_msg: "Crashing the kernel by request", +}; + static void sysrq_handle_sync(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { @@ -235,7 +246,7 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = { it is handled specially on the sparc and will never arrive */ /* b */ &sysrq_reboot_op, -/* c */ NULL, +/* c */ &sysrq_crash_op, /* d */ NULL, /* e */ &sysrq_term_op, /* f */ NULL,