Document FreeBSD quirks
authorNiclas Zeising <zeising@daemonic.se>
Tue, 11 Aug 2020 22:32:42 +0000 (00:32 +0200)
committerNiclas Zeising <zeising@daemonic.se>
Fri, 14 Aug 2020 15:50:56 +0000 (17:50 +0200)
Document FreeBSD quirks related to syspath.

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

index 8c0d89231f46b438f3c60e37eeb0bd506b32188c..41f40fa66ec8d09ff06c5d81c594a91cfbfc6c08 100644 (file)
@@ -138,6 +138,9 @@ enum libevdev_uinput_open_mode {
  * REP_PERIOD will default to the kernel defaults, not to the ones set in the
  * source device.
  *
+ * @note On FreeBSD, if the UI_GET_SYSNAME ioctl() fails, there is no other way
+ * to get a device, and the function call will fail.
+ *
  * @param dev The device to duplicate
  * @param uinput_fd @ref LIBEVDEV_UINPUT_OPEN_MANAGED or a file descriptor to @c /dev/uinput,
  * @param[out] uinput_dev The newly created libevdev device.
@@ -195,6 +198,9 @@ int libevdev_uinput_get_fd(const struct libevdev_uinput *uinput_dev);
  * To avoid false positives, wait at least wait at least 1.5s between
  * creating devices that have the same name.
  *
+ * @note FreeBSD does not have sysfs, on FreeBSD this function always returns
+ * NULL.
+ *
  * @param uinput_dev A previously created uinput device.
  * @return The syspath for this device, including the preceding /sys
  *
@@ -212,6 +218,11 @@ const char* libevdev_uinput_get_syspath(struct libevdev_uinput *uinput_dev);
  *
  * @note This function may return NULL. libevdev may have to guess the
  * syspath and the device node. See libevdev_uinput_get_syspath() for details.
+ *
+ * @note On FreeBSD, this function can not return NULL.  libudev uses the
+ * UI_GET_SYSNAME ioctl to get the device node on this platform and if that
+ * fails, the call to libevdev_uinput_create_from_device() fails.
+ *
  * @param uinput_dev A previously created uinput device.
  * @return The device node for this device, in the form of /dev/input/eventN
  *