Hi On Thu, Jun 19, 2014 at 3:11 PM, David Herrmann <dh.herrmann@xxxxxxxxx> wrote: > This adds a new ioctl UINPUT_DEV_SETUP that replaces the old device setup > method (by write()'ing "struct uinput_user_dev" to the node). The old > method is not easily extendable and requires huge payloads. Furthermore, > overloading write() without properly versioned objects is error-prone. > > Therefore, we introduce a new ioctl to replace the old method. The ioctl > supports all features of the old method, plus a "resolution" field for > absinfo. Furthermore, it's properly forward-compatible to new ABS codes > and a growing "struct input_absinfo" structure. > > The ioctl also allows user-space to skip unknown axes if not set. The > payload-size can now be specified by the caller. There is no need to copy > the whole array temporarily into the kernel, but instead we can iterate > over it and copy each value manually. > > Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxx> > --- > Hi > > I replaced my old approach with a new ioctl(). In my opinion the write() method > for setup is error-prone and hard to replace correctly with a dynamic structure > like I did for this ioctl. The ioctl-way is also much more flexible and allows > read _and_ write in the same call. > > This is untested so far, just wanted to get it out as Peter asked for it. > > Btw., this should even perform better than the old method as it avoids copying > the whole object from the user into a temporary buffer. I forgot to mention, this obviously relies on my other patch: [PATCH] Input: uinput - uinput_validate_absbits() cleanup Thanks David -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html