udev_list

udev_list — list operation

Synopsis

struct              udev_list_entry;
struct udev_list_entry * udev_list_entry_get_next       (struct udev_list_entry *list_entry);
struct udev_list_entry * udev_list_entry_get_by_name    (struct udev_list_entry *list_entry,
                                                         const char *name);
const char *        udev_list_entry_get_name            (struct udev_list_entry *list_entry);
const char *        udev_list_entry_get_value           (struct udev_list_entry *list_entry);
#define             udev_list_entry_foreach             (list_entry, first_entry)

Description

Libudev list operations.

Details

struct udev_list_entry

struct udev_list_entry;

Opaque object representing one entry in a list. An entry contains contains a name, and optionally a value.


udev_list_entry_get_next ()

struct udev_list_entry * udev_list_entry_get_next       (struct udev_list_entry *list_entry);

list_entry :

current entry

Returns :

the next entry from the list, NULL is no more entries are found.

udev_list_entry_get_by_name ()

struct udev_list_entry * udev_list_entry_get_by_name    (struct udev_list_entry *list_entry,
                                                         const char *name);

list_entry :

current entry

name :

name string to match

Returns :

the entry where name matched, NULL if no matching entry is found.

udev_list_entry_get_name ()

const char *        udev_list_entry_get_name            (struct udev_list_entry *list_entry);

list_entry :

current entry

Returns :

the name string of this entry.

udev_list_entry_get_value ()

const char *        udev_list_entry_get_value           (struct udev_list_entry *list_entry);

list_entry :

current entry

Returns :

the value string of this entry.

udev_list_entry_foreach()

#define             udev_list_entry_foreach(list_entry, first_entry)

Helper to iterate over all entries of a list.

list_entry :

entry to store the current position

first_entry :

first entry to start with