libudev Reference Manual | ||||
---|---|---|---|---|
Top | Description |
struct udev_enumerate; struct udev_enumerate * udev_enumerate_ref (struct udev_enumerate *udev_enumerate); void udev_enumerate_unref (struct udev_enumerate *udev_enumerate); struct udev * udev_enumerate_get_udev (struct udev_enumerate *udev_enumerate); struct udev_enumerate * udev_enumerate_new (struct udev *udev); int udev_enumerate_add_match_subsystem (struct udev_enumerate *udev_enumerate, const char *subsystem); int udev_enumerate_add_nomatch_subsystem (struct udev_enumerate *udev_enumerate, const char *subsystem); int udev_enumerate_add_match_sysattr (struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value); int udev_enumerate_add_nomatch_sysattr (struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value); int udev_enumerate_add_match_property (struct udev_enumerate *udev_enumerate, const char *property, const char *value); int udev_enumerate_add_match_sysname (struct udev_enumerate *udev_enumerate, const char *sysname); int udev_enumerate_add_syspath (struct udev_enumerate *udev_enumerate, const char *syspath); int udev_enumerate_scan_devices (struct udev_enumerate *udev_enumerate); int udev_enumerate_scan_subsystems (struct udev_enumerate *udev_enumerate); struct udev_list_entry * udev_enumerate_get_list_entry (struct udev_enumerate *udev_enumerate);
Lookup devices in the sys filesystem, filter devices by properties, and return a sorted list of devices.
struct udev_enumerate;
Opaque object representing one device lookup/sort context.
struct udev_enumerate * udev_enumerate_ref (struct udev_enumerate *udev_enumerate);
Take a reference of a enumeration context.
|
context |
Returns : |
the passed enumeration context |
void udev_enumerate_unref (struct udev_enumerate *udev_enumerate);
Drop a reference of an enumeration context. If the refcount reaches zero, all resources of the enumeration context will be released.
|
context |
struct udev * udev_enumerate_get_udev (struct udev_enumerate *udev_enumerate);
|
context |
Returns : |
the udev library context. |
struct udev_enumerate * udev_enumerate_new (struct udev *udev);
|
udev library context |
Returns : |
an enumeration context |
int udev_enumerate_add_match_subsystem (struct udev_enumerate *udev_enumerate, const char *subsystem);
|
context |
|
filter for a subsystem of the device to include in the list |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_add_nomatch_subsystem (struct udev_enumerate *udev_enumerate, const char *subsystem);
|
context |
|
filter for a subsystem of the device to exclude from the list |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_add_match_sysattr (struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value);
|
context |
|
filter for a sys attribute at the device to include in the list |
|
optional value of the sys attribute |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_add_nomatch_sysattr (struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value);
|
context |
|
filter for a sys attribute at the device to exclude from the list |
|
optional value of the sys attribute |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_add_match_property (struct udev_enumerate *udev_enumerate, const char *property, const char *value);
|
context |
|
filter for a property of the device to include in the list |
|
value of the property |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_add_match_sysname (struct udev_enumerate *udev_enumerate, const char *sysname);
|
context |
|
filter for the name of the device to include in the list |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_add_syspath (struct udev_enumerate *udev_enumerate, const char *syspath);
Add a device to the list of devices, to retrieve it back sorted in dependency order.
|
context |
|
path of a device |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_scan_devices (struct udev_enumerate *udev_enumerate);
|
udev enumeration context |
Returns : |
0 on success, otherwise a negative error value. |
int udev_enumerate_scan_subsystems (struct udev_enumerate *udev_enumerate);
|
udev enumeration context |
Returns : |
0 on success, otherwise a negative error value. |
struct udev_list_entry * udev_enumerate_get_list_entry (struct udev_enumerate *udev_enumerate);
|
context |
Returns : |
the first entry of the sorted list of device paths. |