Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: using joysticks in 32 bit applications on 64 bit systems

unfortunately 32 bit apps don't see the joysticks on a 64 bit system.
this prevents one playing X-Plane (http://www.x-plane.com/) or other
32-bit games with joysticks.

this is a known issue, and already raised several times:

http://readlist.com/lists/vger.kernel.org/linux-kernel/28/144411.html

http://www.brettcsmith.org/wiki/wiki.cgi?action=browse&diff=1&id=OzyComputer/Joystick

unfortunately this is still not fixed in the mainline kernel.

it would be nice to have this fixed, so that people can play these games
without having to patch their kernel.

the following patch solves the problem on 2.6.22.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Akos Maroy and committed by
Linus Torvalds
3fee37c1 7b3d9545

+8
+8
fs/compat_ioctl.c
··· 10 10 * ioctls. 11 11 */ 12 12 13 + #include <linux/joystick.h> 14 + 13 15 #include <linux/types.h> 14 16 #include <linux/compat.h> 15 17 #include <linux/kernel.h> ··· 2643 2641 COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES) 2644 2642 COMPATIBLE_IOCTL(VIDEO_GET_SIZE) 2645 2643 COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE) 2644 + 2645 + /* joystick */ 2646 + COMPATIBLE_IOCTL(JSIOCGVERSION) 2647 + COMPATIBLE_IOCTL(JSIOCGAXES) 2648 + COMPATIBLE_IOCTL(JSIOCGBUTTONS) 2649 + COMPATIBLE_IOCTL(JSIOCGNAME(0)) 2646 2650 2647 2651 /* now things that need handlers */ 2648 2652 HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)