Summary: This adds an API function to return the sysnum of a device
based on syspath. This is needed in ecore-drm to return the id
(sysnum) of a drm device.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
udev_enumerate_unref(en);
return ret;
}
+
+EAPI int
+eeze_udev_syspath_get_sysnum(const char *syspath)
+{
+ _udev_device *device;
+ const char *test;
+ int ret = -1;
+
+ if (!syspath)
+ return NULL;
+
+ if (!(device = _new_device(syspath)))
+ return NULL;
+
+ if ((test = udev_device_get_sysnum(device)))
+ ret = atoi(test);
+
+ udev_device_unref(device);
+ return ret;
+}
+