Commit 2b9e0bac authored by Milton Miller's avatar Milton Miller Committed by Linus Torvalds
Browse files

[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: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8b67f8c1
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -584,8 +584,10 @@ static int hvc_poll(struct hvc_struct *hp)
		}
		for (i = 0; i < n; ++i) {
#ifdef CONFIG_MAGIC_SYSRQ
			if (hp->index == hvc_con_driver.index) {
				/* Handle the SysRq Hack */
			if (buf[i] == '\x0f') {	/* ^O -- should support a sequence */
				/* XXX should support a sequence */
				if (buf[i] == '\x0f') {	/* ^O */
					sysrq_pressed = 1;
					continue;
				} else if (sysrq_pressed) {
@@ -593,6 +595,7 @@ static int hvc_poll(struct hvc_struct *hp)
					sysrq_pressed = 0;
					continue;
				}
			}
#endif /* CONFIG_MAGIC_SYSRQ */
			tty_insert_flip_char(tty, buf[i], 0);
		}