Re: SysRq key from serial console?

Masahiro Adegawa (adegawa@zerosoft.co.jp)
Fri, 30 Jul 1999 19:38:17 +0900


Thanks your response. Pardom me my late response.

Bernd Eckenfels <ecki@lina.inka.de> wrote:
>In article <378DB38038.3ACEADEGAWA@mail.zerosoft.co.jp> you wrote:
>> Hi,
>
>> Can we use SysRq key from serial console?
>
>we could use break.. i think it is mappable to SAK only.

Now,I'm using SysRq from KDB on a serial console.

--- linux-2.2.9-kdb/arch/i386/kdb/kdb.c Wed Jun 2 16:40:07 1999
+++ linux-2.2.9-ikb/arch/i386/kdb/kdb.c Wed Jul 21 14:46:44 1999
@@ -974,6 +974,22 @@
return kdbdumpregs(regs, argv[1], argv[2]);
}

+#ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */
+int
+kdb_sr(int argc, const char **argv, const char **envp, struct pt_regs *regs)
+{
+ /*
+ */
+
+ if (argc != 1) {
+ return KDB_ARGCOUNT;
+ }
+ handle_sysrq(*argv[1], regs, 0, 0);
+
+ return 0;
+}
+#endif
+
/*
* kdb_rm
*
@@ -1559,5 +1575,8 @@
#endif /* __SMP__ */
kdb_register("ps", kdb_ps, "", "Display active task list");
kdb_register("reboot", kdb_reboot, "", "Reboot the machine immediately");
+#ifdef CONFIG_MAGIC_SYSRQ
+ kdb_register("sr", kdb_sr, "<key>", "Magic SysRq key");
+#endif
}

Masahiro Adegawa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/