aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2005-07-07 20:56:19 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:38 -0400
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 46508a737064..e7362c195b11 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)
584 } 584 }
585 for (i = 0; i < n; ++i) { 585 for (i = 0; i < n; ++i) {
586#ifdef CONFIG_MAGIC_SYSRQ 586#ifdef CONFIG_MAGIC_SYSRQ
587 /* Handle the SysRq Hack */ 587 if (hp->index == hvc_con_driver.index) {
588 if (buf[i] == '\x0f') { /* ^O -- should support a sequence */ 588 /* Handle the SysRq Hack */
589 sysrq_pressed = 1; 589 /* XXX should support a sequence */
590 continue; 590 if (buf[i] == '\x0f') { /* ^O */
591 } else if (sysrq_pressed) { 591 sysrq_pressed = 1;
592 handle_sysrq(buf[i], NULL, tty); 592 continue;
593 sysrq_pressed = 0; 593 } else if (sysrq_pressed) {
594 continue; 594 handle_sysrq(buf[i], NULL, tty);
595 sysrq_pressed = 0;
596 continue;
597 }
595 } 598 }
596#endif /* CONFIG_MAGIC_SYSRQ */ 599#endif /* CONFIG_MAGIC_SYSRQ */
597 tty_insert_flip_char(tty, buf[i], 0); 600 tty_insert_flip_char(tty, buf[i], 0);