Message ID | 20081216092408.362722962@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Hendrik Brueckner <brueckner@linux.vnet.ibm.com> writes: > + /* if ^0 is pressed again, reset > + * sysrq_pressed and flip ^0 char */ The comment says ^0 twice when ^O is meant. > + sysrq_pressed = (sysrq_pressed) ? 0 : 1; sysrq_pressed = !sysrc_pressed; Andreas.
--- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -642,8 +642,11 @@ int hvc_poll(struct hvc_struct *hp) /* Handle the SysRq Hack */ /* XXX should support a sequence */ if (buf[i] == '\x0f') { /* ^O */ - sysrq_pressed = 1; - continue; + /* if ^0 is pressed again, reset + * sysrq_pressed and flip ^0 char */ + sysrq_pressed = (sysrq_pressed) ? 0 : 1; + if (sysrq_pressed) + continue; } else if (sysrq_pressed) { handle_sysrq(buf[i], tty); sysrq_pressed = 0;