summaryrefslogtreecommitdiffstats
path: root/src/hwdb/hwdb.c
diff options
context:
space:
mode:
authorNick Rosbrook <nick.rosbrook@canonical.com>2022-05-24 19:15:13 +0200
committerNick Rosbrook <nick.rosbrook@canonical.com>2022-05-27 15:40:54 +0200
commitbeff73f94e565e4d6c6383c535b8b0742b37c312 (patch)
treeaa59ad8a76e1b2b6e271f6448e6444f804428d1c /src/hwdb/hwdb.c
parentsd-hwdb: add sd_hwdb_new_from_path (diff)
downloadsystemd-beff73f94e565e4d6c6383c535b8b0742b37c312.tar.xz
systemd-beff73f94e565e4d6c6383c535b8b0742b37c312.zip
hwdb: implement --root option for systemd-hwdb query
Currently, the systemd-hwdb --root flag only has an effect for the 'update' verb. It would be useful to be able to use the --root option for the 'query' verb too (e.g. for testing a hwdb.bin created with systemd-hwdb update --root <path>). Use sd_hwdb_new_from_path to initialize the hwdb if --root is passed to systemd-hwdb query. Note that this functionality was not added to 'udevadm hwdb' since that command is deprecated.
Diffstat (limited to 'src/hwdb/hwdb.c')
-rw-r--r--src/hwdb/hwdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
index 17ac7e4fbe..6925aecd84 100644
--- a/src/hwdb/hwdb.c
+++ b/src/hwdb/hwdb.c
@@ -18,7 +18,7 @@ static const char *arg_root = NULL;
static bool arg_strict = false;
static int verb_query(int argc, char *argv[], void *userdata) {
- return hwdb_query(argv[1]);
+ return hwdb_query(argv[1], arg_root);
}
static int verb_update(int argc, char *argv[], void *userdata) {