[PATCH] Add argument-less ppdev ioctls to compat_ioctl.h

From: Petr Vandrovec
Date: Sat Nov 06 2004 - 14:59:55 EST


Hello Andrew,
ppdev's ioctls are not available for 32bit apps on 64bit systems. There are
four ioctls which take no argument at all (so they are compatible between
32bit and 64bit), these numbers do not clash with any other ioctl code, and
so I see no reason why not applying patch below.

It solves problem VMware users are faced on 64bit systems if they want to
use direct access to the parallel port.
Thanks,
Petr Vandrovec


Signed-off-by: Petr Vandrovec <vandrove@xxxxxxxxxx>

diff -urdN linux/fs/compat_ioctl.c linux/fs/compat_ioctl.c
--- linux/fs/compat_ioctl.c 2004-11-05 23:39:48.000000000 +0100
+++ linux/fs/compat_ioctl.c 2004-11-06 16:14:15.000000000 +0100
@@ -96,6 +96,7 @@
#include <asm/module.h>
#include <linux/soundcard.h>
#include <linux/lp.h>
+#include <linux/ppdev.h>

#include <linux/atm.h>
#include <linux/atmarp.h>
diff -urdN linux/include/linux/compat_ioctl.h linux/include/linux/compat_ioctl.h
--- linux/include/linux/compat_ioctl.h 2004-11-05 23:39:16.000000000 +0100
+++ linux/include/linux/compat_ioctl.h 2004-11-06 14:55:55.000000000 +0100
@@ -340,6 +340,11 @@
COMPATIBLE_IOCTL(PPPOEIOCDFWD)
/* LP */
COMPATIBLE_IOCTL(LPGETSTATUS)
+/* ppdev */
+COMPATIBLE_IOCTL(PPCLAIM)
+COMPATIBLE_IOCTL(PPRELEASE)
+COMPATIBLE_IOCTL(PPEXCL)
+COMPATIBLE_IOCTL(PPYIELD)
/* CDROM stuff */
COMPATIBLE_IOCTL(CDROMPAUSE)
COMPATIBLE_IOCTL(CDROMRESUME)
-
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/