Below is a patch to add compat_ioctls for hiddev. All hiddev ioctl structures use explicitly sized types or int so I believe they are all safely translated with COMPATIBLE_IOCTL.
HIDIOCGNAME and HIDIOCGPHYS have been omitted because they play games with encoding user-supplied data in the ioctl len field, making them unsuitable for COMPATIBLE_IOCTL. The includes are a bit hairy because a recent change to hiddev.h made it rely on hid.h which in turn needs input.h. The changes have been tested on sparc64. --Adam diff -Nru linux-2.6.6/fs/compat_ioctl.c linux-2.6.6-adk/fs/compat_ioctl.c --- linux-2.6.6/fs/compat_ioctl.c Wed May 12 11:52:26 2004 +++ linux-2.6.6-adk/fs/compat_ioctl.c Sun May 16 13:40:07 2004 @@ -114,6 +114,11 @@ #include <linux/filter.h> #include <linux/msdos_fs.h> +/* Ick. hiddev.h needs hid.h which needs input.h */ +#include <linux/input.h> +#include <../drivers/usb/input/hid.h> +#include <linux/hiddev.h> + #undef INCLUDES #endif diff -Nru linux-2.6.6/include/linux/compat_ioctl.h linux-2.6.6-adk/include/linux/compat_ioctl.h --- linux-2.6.6/include/linux/compat_ioctl.h Wed May 12 11:52:31 2004 +++ linux-2.6.6-adk/include/linux/compat_ioctl.h Sun May 16 14:12:28 2004 @@ -720,3 +720,20 @@ COMPATIBLE_IOCTL(SIOCGIWRETRY) COMPATIBLE_IOCTL(SIOCSIWPOWER) COMPATIBLE_IOCTL(SIOCGIWPOWER) +/* hiddev */ +COMPATIBLE_IOCTL(HIDIOCGVERSION) +COMPATIBLE_IOCTL(HIDIOCAPPLICATION) +COMPATIBLE_IOCTL(HIDIOCGDEVINFO) +COMPATIBLE_IOCTL(HIDIOCGSTRING) +COMPATIBLE_IOCTL(HIDIOCINITREPORT) +COMPATIBLE_IOCTL(HIDIOCGREPORT) +COMPATIBLE_IOCTL(HIDIOCSREPORT) +COMPATIBLE_IOCTL(HIDIOCGREPORTINFO) +COMPATIBLE_IOCTL(HIDIOCGFIELDINFO) +COMPATIBLE_IOCTL(HIDIOCGUSAGE) +COMPATIBLE_IOCTL(HIDIOCSUSAGE) +COMPATIBLE_IOCTL(HIDIOCGUCODE) +COMPATIBLE_IOCTL(HIDIOCGFLAG) +COMPATIBLE_IOCTL(HIDIOCSFLAG) +COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINDEX) +COMPATIBLE_IOCTL(HIDIOCGCOLLECTIONINFO) ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel