[PATCH 4/14] hvc_console: MAGIC_SYSRQ should only be on console channel

Anton Blanchard anton at samba.org
Thu Jul 7 01:53:18 EST 2005


From: Milton Miller <miltonm at bga.com>

Guard the MAGIC_SYSRQ ^O to be just on the console channel.
Make the other channels more transparent.

Signed-off-by: Milton Miller <miltonm at bga.com>
Signed-off-by: Anton Blanchard <anton at samba.org>

diff -puN drivers/char/hvc_console.c~hvc-console-sysrq drivers/char/hvc_console.c
--- gr_work_udbg/drivers/char/hvc_console.c~hvc-console-sysrq	2005-02-08 02:09:27.502022024 -0600
+++ gr_work_udbg-miltonm/drivers/char/hvc_console.c	2005-02-08 02:32:09.105245274 -0600
@@ -584,14 +584,17 @@ static int hvc_poll(struct hvc_struct *h
 		}
 		for (i = 0; i < n; ++i) {
 #ifdef CONFIG_MAGIC_SYSRQ
-			/* Handle the SysRq Hack */
-			if (buf[i] == '\x0f') {	/* ^O -- should support a sequence */
-				sysrq_pressed = 1;
-				continue;
-			} else if (sysrq_pressed) {
-				handle_sysrq(buf[i], NULL, tty);
-				sysrq_pressed = 0;
-				continue;
+			if (hp->index == hvc_con_driver.index) {
+				/* Handle the SysRq Hack */
+				/* XXX should support a sequence */
+				if (buf[i] == '\x0f') {	/* ^O */
+					sysrq_pressed = 1;
+					continue;
+				} else if (sysrq_pressed) {
+					handle_sysrq(buf[i], NULL, tty);
+					sysrq_pressed = 0;
+					continue;
+				}
 			}
 #endif /* CONFIG_MAGIC_SYSRQ */
 			tty_insert_flip_char(tty, buf[i], 0);
_



More information about the Linuxppc64-dev mailing list