Re: [PATCH] fix: macros to detect existance of unlocked_ioctl and compat_ioctl

From: Greg KH
Date: Wed Jan 12 2005 - 16:42:51 EST


On Wed, Jan 12, 2005 at 10:36:06PM +0200, Michael S. Tsirkin wrote:
> To make life bearable for out-of kernel modules, the following patch
> adds 2 macros so that existance of unlocked_ioctl and compat_ioctl
> can be easily detected.
>
> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxxxxxx>
>
> diff -puN include/linux/fs.h~ioctl-rework include/linux/fs.h
> --- 25/include/linux/fs.h~ioctl-rework Thu Dec 16 15:48:31 2004
> +++ 25-akpm/include/linux/fs.h Thu Dec 16 15:48:31 2004
> @@ -907,6 +907,12 @@ typedef struct {
>
> typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long);
>
> +/* These macros are for out of kernel modules to test that
> + * the kernel supports the unlocked_ioctl and compat_ioctl
> + * fields in struct file_operations. */
> +#define HAVE_COMPAT_IOCTL 1
> +#define HAVE_UNLOCKED_IOCTL 1

No, we do not do that in the kernel today, and I'm pretty sure we don't
want to start doing it (it would get _huge_ very quickly...)

Please don't apply this. Remember, out-of-the-tree modules are on their
own.

thanks,

greg k-h
-
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/