## udev_hwdb udev_hwdb — retrieve properties from the hardware database |

## Functions

struct udev_hwdb * | udev_hwdb_ref ()
struct udev_hwdb * | udev_hwdb_unref ()
struct udev_hwdb * | udev_hwdb_new ()
struct udev_list_entry * | udev_hwdb_get_properties_list_entry ()

## Types and Values

struct | udev_hwdb

## Description

Libudev hardware database interface.

## Functions

### udev_hwdb_ref ()

    struct udev_hwdb *
    udev_hwdb_ref (struct udev_hwdb *hwdb);

Take a reference of a hwdb context.

#### Parameters

hwdb | context |

#### Returns

the passed enumeration context

### udev_hwdb_unref ()

    struct udev_hwdb *
    udev_hwdb_unref (struct udev_hwdb *hwdb);

Drop a reference of a hwdb context. If the refcount reaches zero, all resources of the hwdb context will be released.

#### Parameters

hwdb | context |

#### Returns

NULL

### udev_hwdb_new ()

    struct udev_hwdb *
    udev_hwdb_new (struct udev *udev);

Create a hardware database context to query properties for devices.

#### Parameters

udev | udev library context |

#### Returns

a hwdb context.

### udev_hwdb_get_properties_list_entry ()

    struct udev_list_entry *
    udev_hwdb_get_properties_list_entry (struct udev_hwdb *hwdb,
                                         const char *modalias,
                                         unsigned int flags);

Lookup a matching device in the hardware database. The lookup key is a modalias string, whose formats are defined for the Linux kernel modules. Examples are: pci:v00008086d00001C2D*, usb:v04F2pB221*. The first entry of a list of retrieved properties is returned.

#### Parameters

hwdb | context |
modalias | modalias string |
flags | (unused) |

#### Returns

a udev_list_entry.

## Types and Values

### struct udev_hwdb

    struct udev_hwdb;

Opaque object representing the hardware database.