Re: [patch] Re: Magic Alt-SysRq change in 2.6.18-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 7/12/06, Paulo Marques <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux