[PATCH] 2.5.41: lkcd (5/8): sysrq changes for dump

From: Matt D. Robinson (yakker@aparity.com)
Date: Thu Oct 10 2002 - 15:04:27 EST


Add sysrq hooks for dump crash dump handling.

 sysrq.c | 13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)

diff -urN -X /home/bharata/dontdiff linux-2.5.41/drivers/char/sysrq.c linux-2.5.41+lkcd/drivers/char/sysrq.c
--- linux-2.5.41/drivers/char/sysrq.c Mon Oct 7 23:54:50 2002
+++ linux-2.5.41+lkcd/drivers/char/sysrq.c Tue Oct 8 13:27:28 2002
@@ -32,6 +32,7 @@
 #include <linux/buffer_head.h> /* for fsync_bdev() */
 
 #include <linux/spinlock.h>
+#include <linux/dump.h>
 
 #include <asm/ptrace.h>
 
@@ -307,6 +308,16 @@
         }
 }
 
+static void sysrq_handle_crashdump(int key, struct pt_regs *pt_regs,
+ struct tty_struct *tty) {
+ dump("sysrq", pt_regs);
+}
+static struct sysrq_key_op sysrq_crashdump_op = {
+ handler: sysrq_handle_crashdump,
+ help_msg: "Crash",
+ action_msg: "Start a Crash Dump (If Configured)",
+};
+
 static void sysrq_handle_term(int key, struct pt_regs *pt_regs,
                               struct tty_struct *tty)
 {
@@ -352,7 +363,7 @@
                  it is handled specially on the spark
                  and will never arive */
 /* b */ &sysrq_reboot_op,
-/* c */ NULL,
+/* c */ &sysrq_crashdump_op,
 /* d */ NULL,
 /* e */ &sysrq_term_op,
 /* f */ NULL,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:38 EST