Commit 5a411c46 authored by Jesse Barnes's avatar Jesse Barnes Committed by Linus Torvalds

[PATCH] fix sysrq handling bug in sn_console.c

Fix a stupid bug in the sysrq handling in sn_console.c.  Instead of eating
all characters in the sysrq string (preventing them from getting to the tty
layer), only eat those following 'ESC' since that's a pretty important
character for various things.  Please apply before 2.6.9 is released as the
console is very unfriendly to use without it.
Signed-off-by: default avatarJesse Barnes <jbarnes@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a0952e06
...@@ -596,7 +596,12 @@ sn_receive_chars(struct sn_cons_port *port, struct pt_regs *regs, ...@@ -596,7 +596,12 @@ sn_receive_chars(struct sn_cons_port *port, struct pt_regs *regs,
sysrq_requested = jiffies; sysrq_requested = jiffies;
sysrq_serial_ptr = sysrq_serial_str; sysrq_serial_ptr = sysrq_serial_str;
} }
continue; /* ignore the whole sysrq string */ /*
* ignore the whole sysrq string except for the
* leading escape
*/
if (ch != '\e')
continue;
} }
else else
sysrq_serial_ptr = sysrq_serial_str; sysrq_serial_ptr = sysrq_serial_str;
...@@ -611,8 +616,6 @@ sn_receive_chars(struct sn_cons_port *port, struct pt_regs *regs, ...@@ -611,8 +616,6 @@ sn_receive_chars(struct sn_cons_port *port, struct pt_regs *regs,
if (tty->flip.count == TTY_FLIPBUF_SIZE) if (tty->flip.count == TTY_FLIPBUF_SIZE)
break; break;
} }
else {
}
port->sc_port.icount.rx++; port->sc_port.icount.rx++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment