Re: [patch] fix magic sysrq on strange keyboards

From: Andrew Morton
Date: Thu May 18 2006 - 15:10:46 EST


Pavel Machek <pavel@xxxxxxx> wrote:
>
> Magic sysrq fails to work on many keyboards, particulary most of
> notebook keyboards. This should help...
>
> The idea is quite simple: Discard the SysRq break code if Alt is still
> being held down. This way the broken keyboard can send the break code
> (or the user with a normal keyboard can release the SysRq key) and the
> kernel waits until the next key is pressed or the Alt key is released.
>
> From: Fredrik Roubert <roubert@xxxxxxxxx>
> Signed-off-by: Pavel Machek <pavel@xxxxxxx>
>

What kernel are you patching here?


> index 5d84839..4602cf3 100644
> --- a/drivers/char/keyboard.c
> +++ b/drivers/char/keyboard.c
> @@ -149,7 +149,8 @@ unsigned char kbd_sysrq_xlate[KEY_MAX +
> "\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
> "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
> "\r\000/"; /* 0x60 - 0x6f */
> -static int was_sysrq;
> +static int sysrq_down;
> +static int sysrq_alt_use;

bix:/usr/src/linux-2.6.17-rc4> grep was_sysrq drivers/char/sysrq.c
bix:/usr/src/linux-2.6.17-rc4>

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