eeze: Add code for eeze_udev_syspath_get_sysnum function
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>
This commit is contained in:
parent
34ba873497
commit
25c3570294
|
@ -314,3 +314,24 @@ eeze_udev_devpath_get_syspath(const char *devpath)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue