lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectuinput: waiting for UI_FF_UPLOAD events will not inform user when allocation is required
Currently the "fake" input events generated by uinput in response to
effect uploads will return an effect with an id that has already been
handled by input_ff_upload in ff-core.c, which can modify the effect
id. This causes a problem specifically when the effect originally
uploaded via the EVIOCSFF ioctl contained an effect with -1, as the
userspace code handling UI_FF_UPLOAD receives an effect with an id
other than -1, and therefore will not know an allocation was
requested.

I notice that the "old" field on the ff_effect struct is set to NULL
when the -1 id is changed (in input_ff_upload), which can serve as a
flag that an allocation was requested. If it is the intention is that
uinput users check if old == NULL to know when allocations are needed
I think uinput documentation should describe this.

I first noticed this using python-evdev, see my issue report here:
https://github.com/gvalkov/python-evdev/issues/199

\
 
 \ /
  Last update: 2023-10-10 09:09    [W:0.045 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site