* [PATCH] atkbd.c: make the unknown key warnings controllable thru a config option
@ 2008-06-29 16:54 Denis Zaitceff
2008-06-30 12:21 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Denis Zaitceff @ 2008-06-29 16:54 UTC (permalink / raw)
To: vojtech, dmitry.torokhov; +Cc: linux-input, linux-kernel
The patch allows to configure off the logging of ATKBD_KEY_UNKNOWN
events. This logging can be healthy, but usually it just pollutes the
kernel log. And this logging may be _very_ massive.
Very probably that other (than atkbd) keyboard drivers may win from
the similar patches.
Please apply this patch.
--- drivers/input/keyboard/Kconfig
+++ drivers/input/keyboard/Kconfig
@@ -12,6 +12,15 @@ menuconfig INPUT_KEYBOARD
if INPUT_KEYBOARD
+config KEYBOARD_VERBOSE_KEY_UNKNOWN
+ bool "Report unknown keys"
+ default n
+ help
+ If Y, each press and release of any key unknown to the keyboard driver
+ will be logged at the KERN_WARNING level. This is really good if you
+ want to study your keyboard, but may really flood your logs.
+ Be warned!
+
config KEYBOARD_ATKBD
tristate "AT keyboard" if EMBEDDED || !X86_PC
default y
--- drivers/input/keyboard/atkbd.c
+++ drivers/input/keyboard/atkbd.c
@@ -442,6 +442,7 @@ static irqreturn_t atkbd_interrupt(struc
case ATKBD_KEY_NULL:
break;
case ATKBD_KEY_UNKNOWN:
+#ifdef KEYBOARD_VERBOSE_KEY_UNKNOWN
printk(KERN_WARNING
"atkbd.c: Unknown key %s (%s set %d, code %#x on %s).\n",
atkbd->release ? "released" : "pressed",
@@ -450,6 +451,7 @@ static irqreturn_t atkbd_interrupt(struc
printk(KERN_WARNING
"atkbd.c: Use 'setkeycodes %s%02x <keycode>' to make it known.\n",
code & 0x80 ? "e0" : "", code & 0x7f);
+#endif
input_sync(dev);
break;
case ATKBD_SCR_1:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] atkbd.c: make the unknown key warnings controllable thru a config option
2008-06-29 16:54 [PATCH] atkbd.c: make the unknown key warnings controllable thru a config option Denis Zaitceff
@ 2008-06-30 12:21 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2008-06-30 12:21 UTC (permalink / raw)
To: vojtech, linux-input, linux-kernel
Hi Denis,
On Sun, Jun 29, 2008 at 10:54:23PM +0600, Denis Zaitceff wrote:
> The patch allows to configure off the logging of ATKBD_KEY_UNKNOWN
> events. This logging can be healthy, but usually it just pollutes the
> kernel log. And this logging may be _very_ massive.
>
You can easily shut off the warnings by actually mapping the key,
so there is no need to add a new config option.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-30 12:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-29 16:54 [PATCH] atkbd.c: make the unknown key warnings controllable thru a config option Denis Zaitceff
2008-06-30 12:21 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox