]> git.baikalelectronics.ru Git - kernel.git/commit
Input: joydev - validate axis/button maps before clobbering current ones
authorStephen Kitt <steve@sk2.org>
Wed, 26 Aug 2009 02:24:22 +0000 (19:24 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 28 Aug 2009 05:01:39 +0000 (22:01 -0700)
commit2e9f4bbf38892127c848fa7d5c25c7fc5966be89
treeeff35a1a2622dc976319fd52dab12f6bbdc8d3a1
parentbfb8db688d834b9bc37ddee77254f6a6498c2f22
Input: joydev - validate axis/button maps before clobbering current ones

Up to now axis and button map validation was done after the user-supplied
values were copied over the driver's map. This patch copies the
user-supplied values into temporary buffers and validated them before
overwriting the driver's permanent maps.

Also change JSIOCGBTNMAP and JSIOCGAXMAP to return number of bytes returned
to userspace instead of 0.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/joydev.c