summaryrefslogtreecommitdiff
path: root/src/hwdb
diff options
context:
space:
mode:
authorNick Rosbrook <nick.rosbrook@canonical.com>2022-05-24 13:15:13 -0400
committerNick Rosbrook <nick.rosbrook@canonical.com>2022-05-27 09:40:54 -0400
commitbeff73f94e565e4d6c6383c535b8b0742b37c312 (patch)
treeaa59ad8a76e1b2b6e271f6448e6444f804428d1c /src/hwdb
parent60f0ba75569312825ff14680d05a4b4f95842951 (diff)
downloadsystemd-beff73f94e565e4d6c6383c535b8b0742b37c312.tar.gz
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')
-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) {