sd-hwdb: add sd_hwdb_new_from_path
authorNick Rosbrook <nick.rosbrook@canonical.com>
Tue, 24 May 2022 17:08:06 +0000 (13:08 -0400)
committerNick Rosbrook <nick.rosbrook@canonical.com>
Fri, 27 May 2022 13:40:54 +0000 (09:40 -0400)
commit60f0ba75569312825ff14680d05a4b4f95842951
treefa8a13019740da0d1f1fd22411c6bbd27460a9e0
parent9745b51c73c78a63003b4cb6e0714829144d297c
sd-hwdb: add sd_hwdb_new_from_path

The existing sd_hwdb_new function always initializes the hwdb from the
first successful hwdb.bin it finds from hwdb_bin_paths. This means there
is currently no way to initialize a hwdb from an explicit path, which
would be useful for systemd-hwdb query.

Add sd_hwdb_new_from_path to allow a sd_hwdb to be initialized from a
custom path outside of hwdb_bin_paths.
man/sd_hwdb_new.xml
src/libsystemd/libsystemd.sym
src/libsystemd/sd-hwdb/sd-hwdb.c
src/systemd/sd-hwdb.h
src/test/test-sd-hwdb.c