uinput: Implement FreeBSD fetch_syspath_and_devnode()
authorNiclas Zeising <zeising@daemonic.se>
Thu, 13 Aug 2020 10:01:35 +0000 (12:01 +0200)
committerNiclas Zeising <zeising@daemonic.se>
Fri, 14 Aug 2020 15:50:56 +0000 (17:50 +0200)
commit83e446225d3a71f4aea8691d28c5ced763afb360
tree9dfaf39e4c585e8aba608413081495b1b6b138f6
parent153d8d0a5ad6bf2379bd03df6307029180bac0ab
uinput: Implement FreeBSD fetch_syspath_and_devnode()

Implement a FreeBSD version of fetch_syspath_and_devnode().
FreeBSD does not have sysfs, so instead fetch the device node directly
as as this matches with what is returned by the UI_GET_SYSNAME ioctl().
Since there is no sysfs, libevdev_uinput.syspath will always be set to NULL.

If the ioctl fail, return -1 from fetch_syspath_and_devnode(), since
there is no other way to figure out the device node path.

Signed-off-by: Niclas Zeising <zeising@daemonic.se>
libevdev/libevdev-uinput.c