Commit 3fee37c1e2579ed3d6090f690e5fd8cf7fa3bb44
Committed by
Linus Torvalds
1 parent
7b3d9545f9
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff
fs/compat_ioctl.c
... | ... | @@ -10,6 +10,8 @@ |
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> |
... | ... | @@ -2641,6 +2643,12 @@ |
2641 | 2643 | COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES) |
2642 | 2644 | COMPATIBLE_IOCTL(VIDEO_GET_SIZE) |
2643 | 2645 | COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE) |
2646 | + | |
2647 | +/* joystick */ | |
2648 | +COMPATIBLE_IOCTL(JSIOCGVERSION) | |
2649 | +COMPATIBLE_IOCTL(JSIOCGAXES) | |
2650 | +COMPATIBLE_IOCTL(JSIOCGBUTTONS) | |
2651 | +COMPATIBLE_IOCTL(JSIOCGNAME(0)) | |
2644 | 2652 | |
2645 | 2653 | /* now things that need handlers */ |
2646 | 2654 | HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob) |