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

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

Post by Matt D. Robinso » Fri, 11 Oct 2002 22:20:07



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

 #include <linux/buffer_head.h>           /* for fsync_bdev() */

 #include <linux/spinlock.h>
+#include <linux/dump.h>

 #include <asm/ptrace.h>

        }
 }

+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)

                 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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/