#include <systemd/sd-hwdb.h>
sd_hwdb_new()
The hwdb object is reference counted. sd_hwdb_ref() and sd_hwdb_unref() may be used to get a new reference or destroy an existing reference to an object. The caller must dispose of the reference acquired with sd_hwdb_new() by calling sd_hwdb_unref() when done with the object.
Use sd_hwdb_seek(3), sd_hwdb_get(3), and sd_hwdb_enumerate(3) to access entries.
On success, sd_hwdb_new() returns a non-negative integer. On failure, it returns a negative errno-style error code.
sd_hwdb_ref() always returns the argument.
sd_hwdb_unref() always returns NULL.
Returned errors may indicate the following problems:
-ENOENT
-EINVAL
-ENOMEM
These APIs are implemented as a shared library, which can be compiled and linked to with the libsystemd pkg-config(1) file.
systemd(1), systemd-udevd.service(8), sd-hwdb(3), systemd-hwdb(3)