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

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

 



Paulo Marques <[email protected]> wrote:
> Roman Zippel wrote:
>> On Tue, 11 Jul 2006, Andrew Morton wrote:
>> [...]
>>> What, actually, is the problem?
>> 
>> It changes the behaviour, it will annoy the hell out of people like me who
>> have to deal with different kernels and expect this to just work. :-(
>> Since then has it been acceptable to just go ahead and break stuff? This
>> problem doesn't really look unsolvable, so why is my request to fix the
>> damn thing so unreasonable?
> 
> Ok, what about this one?
> 
> I don't have time to test it (it compiles, at least), but it seems the
> logic is pretty clear: once you have pressed both "Alt" and "SysRq"
> sysrq mode becomes active until you release *both* keys. In this mode
> any regular key press triggers handle_sysrq.
> 
> This allows for all the combinations mentioned before in this thread and
> makes the logic simpler, IMHO.

Why don't you use a bitmask?
alt-sysrq down -> val  =  0b11
sysrq up       -> val &= ~0b01
alt up         -> val &= ~0b10

test is_sysrq == !!val
-- 
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.

http://david.woodhou.se/why-not-spf.html
-
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