[PATCH] hvc_console: MAGIC_SYSRQ should only be on console channel
authorMilton Miller <miltonm@bga.com>
Fri, 8 Jul 2005 00:56:19 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 8 Jul 2005 01:23:38 +0000 (18:23 -0700)
Guard the MAGIC_SYSRQ ^O to be just on the console channel.  Make the other
channels more transparent.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/hvc_console.c

index 46508a737064a49c3c6452ae3a0b4fcc8f7f21e9..e7362c195b117194c0251d4eac05a893e200821f 100644 (file)
@@ -584,14 +584,17 @@ static int hvc_poll(struct hvc_struct *hp)
                }
                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);