[PATCH xorg-gtest 16/16] Add Device::GetDeviceNode() to return device node path from an evemu device

Chase Douglas chase.douglas at canonical.com
Thu Jul 5 14:19:33 PDT 2012


On 07/03/2012 11:03 PM, Peter Hutterer wrote:
> On Tue, Jul 03, 2012 at 11:40:25AM -0700, Chase Douglas wrote:
>> On 07/02/2012 11:44 PM, Peter Hutterer wrote:
>>> evemu doesn't export this information and even evemu-device just trawls
>>> through the file system to print this info. So do the same here, noting the
>>> time before evemu_create() and the ctime of the new device file. If the
>>> latter is later than the former and the device names match, we can assume
>>> this is our device.
>>
>> I just want to point out that it's a deficiency in uinput, not in
>> evemu, in case anyone had any thoughts of trying to fix evemu
>> instead.
>
> I did try. This could easily be part of evemu, running this exact same code
> right after the UI_DEV_CREATE call. Unfortunately evemu_create() takes a
> const struct so we can't save it easily without breaking ABI.

Well, evemu could try to guess, just as this code does. What I meant was 
more that uinput is deficient in that there's no way to be 100% sure. 
That's the main reason why we didn't bother putting code like this into 
evemu directly.

-- Chase


More information about the xorg-devel mailing list