fix sysrq handling bug in sn_console.c
PATCH 1/1 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 Jesse Barnes <[email protected]>
Thanks,
Jesse
drivers/serial/sn_console.c +7 -4
@@ -596,10 +596,15 @@ sysrq_requested = jiffies; 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 - sysrq_serial_ptr = sysrq_serial_str; + sysrq_serial_ptr = sysrq_serial_str;#endif /* CONFIG_MAGIC_SYSRQ */ /* record the character to pass up to the tty layer */
@@ -611,8 +616,6 @@if (tty->flip.count ==TTY_FLIPBUF_SIZE )break ; } -else { - } port->sc_port.icount.rx++; }