summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2005-07-07 17:56:19 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 18:23:38 -0700
commit2b9e0bac9419404a2d210ccaffaec442fe63338e (patch)
tree30e434f301c38c66cc0ee4ebe9e7e0a594ce629e
parent8b67f8c177a642b35b7a05f530c12ef2834ef182 (diff)
[PATCH] hvc_console: MAGIC_SYSRQ should only be on console channel
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>
-rw-r--r--drivers/char/hvc_console.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 46508a73706..e7362c195b1 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -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);