Re: [announce] mdevd-0.0.1.0 - a mdev-compatible uevent manager

From: Casper Ti. Vector <caspervector_at_gmail.com>
Date: Wed, 15 Nov 2017 09:38:44 +0800

The only fragment in xf86-input-evdev that requires libudev is
(from src/evdev.c, with some changes in whitespaces):
> ...
> #include <libudev.h>
> ...
>
> static BOOL
> EvdevDeviceIsVirtual(const char* devicenode)
> {
> struct udev *udev = NULL;
> struct udev_device *device = NULL;
> struct stat st;
> int rc = FALSE;
> const char *devpath;
>
> udev = udev_new();
> if (!udev) goto out;
> if (stat(devicenode, &st) == -1) goto out;
>
> device = udev_device_new_from_devnum(udev, 'c', st.st_rdev);
> if (!device) goto out;
>
> devpath = udev_device_get_devpath(device);
> if (!devpath) goto out;
> if (strstr(devpath, "LNXSYSTM")) rc = TRUE;
>
> out:
> udev_device_unref(device);
> udev_unref(udev);
> return rc;
> }
which seems not quite difficult to replace...

On Tue, Nov 14, 2017 at 11:00:06PM +0100, Didier Kryn wrote:
> A most desired addition to mdev would be to provide a means for Xorg to
> autoconfigure, which it does now, IIUC, with the help of libudev. This
> doesn't means using the same API as libudev because I bet Xorg people would
> be open to an alternative.

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C
Received on Wed Nov 15 2017 - 01:38:44 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC