From beff73f94e565e4d6c6383c535b8b0742b37c312 Mon Sep 17 00:00:00 2001 From: Nick Rosbrook Date: Tue, 24 May 2022 13:15:13 -0400 Subject: 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 ). 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. --- src/hwdb/hwdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hwdb') 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) { -- cgit v1.2.1