lkml.org 
[lkml]   [2006]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] Re: Magic Alt-SysRq change in 2.6.18-rc1
Hi,

On 7/12/06, Paulo Marques <pmarques@grupopie.com> wrote:
>
> Ok, I've tested it this time and this new one works as expected. I can
> use any of the sequences discussed and I can produce a SysRq every time.
> Still, just pressing SysRq or any sequence that doesn't start with
> "press Alt -> press SysRq" seems unaffected.
>

I like this, however:

> + if (keycode == KEY_SYSRQ) {
> + if (down) {
> + if(sysrq_alt)
> + sysrq_down = down;
> + } else {
> + sysrq_down = 0;

Are you sure? This will set sysrq_down only if ALT has already been
pressed. If SysRq does not autorepeat and it is pressed first we won't
ever see sysrq_down. Am I missing something?

> +
> + if (sysrq_down && sysrq_alt)
> + sysrq_active = 1;
> + else if (!sysrq_down && !sysrq_alt)
> + sysrq_active = 0;
> +
> + if (keycode == KEY_SYSRQ && sysrq_active)
> + return;

What about alt? I think that "if (...) sysrq_active = 1;" statement
should go down, below handle_sysrq block.

> +
> + if (sysrq_active && down && !rep) {
> handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty);
> return;
> }
>

We also need to check if emulate_raw() needs to be adjusted...

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-12 22:09    [W:0.068 / U:0.108 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site