Functions
Walks
Eeze » main » udev

These are functions which walk up the device chain. More...

Functions

EAPI Eina_Bool eeze_udev_walk_check_sysattr (const char *syspath, const char *sysattr, const char *value)
 Walks up the device chain starting at syspath, checking each device for sysattr with (optional) value. More...
 
EAPI const char * eeze_udev_walk_get_sysattr (const char *syspath, const char *sysattr)
 Walks up the device chain starting at syspath, checking each device for sysattr, and returns the value if found. More...
 

Detailed Description

These are functions which walk up the device chain.

Function Documentation

◆ eeze_udev_walk_check_sysattr()

EAPI Eina_Bool eeze_udev_walk_check_sysattr ( const char *  syspath,
const char *  sysattr,
const char *  value 
)

Walks up the device chain starting at syspath, checking each device for sysattr with (optional) value.

Parameters
syspathThe /sys/ path of the device to start at, with or without the /sys/
sysattrThe attribute to find
valueOPTIONAL: The value that sysattr should have, or NULL
Returns
If the sysattr (with value) is found, returns TRUE. Else, false.

References EINA_FALSE, and EINA_TRUE.

◆ eeze_udev_walk_get_sysattr()

EAPI const char * eeze_udev_walk_get_sysattr ( const char *  syspath,
const char *  sysattr 
)

Walks up the device chain starting at syspath, checking each device for sysattr, and returns the value if found.

Parameters
syspathThe /sys/ path of the device to start at, with or without the /sys/
sysattrThe attribute to find
Returns
The stringshared value of sysattr if found, or NULL

References eina_stringshare_add().