Skip to content

Commit

Permalink
[PATCH] hvc_console: MAGIC_SYSRQ should only be on console channel
Browse files Browse the repository at this point in the history
Guard the MAGIC_SYSRQ ^O to be just on the console channel.  Make the other
channels more transparent.

Signed-off-by: Milton Miller <[email protected]>
Signed-off-by: Anton Blanchard <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Milton Miller authored and Linus Torvalds committed Jul 8, 2005
1 parent 8b67f8c commit 2b9e0ba
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2b9e0ba

Please sign in to comment.