Re: [RFC][PATCH] input: Introduce device information ioctl

From: Arnd Bergmann
Date: Tue Dec 07 2010 - 07:55:24 EST


On Tuesday 07 December 2010, Kay Sievers wrote:
> >> Oh, how does that work? With the ioctl call, userspace has to supply
> >> the size it expects to be returned from the kernel. How does the
> >> kernel otherwise know how much it is allowed to copy to the user?
> >
> > The ioctl command number itself is calculated from the size of the
> > data that gets passed:
> >
> > #define EVIOCGDEVINFO _IOR('E', 0x09, struct input_devinfo)
> >
> > If struct input_devinfo ever changes (which it can, but should not),
> > the command changes as well.
>
> So unlike statet, it's not extensible, and this struct and this ioctl
> can never change?

Exactly. We have plenty of unused ioctl numbers free though.

Arnd
--
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/