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/udev/udevadm-hwdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/udev/udevadm-hwdb.c') diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 162b3516b8..972cda129d 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -95,7 +95,7 @@ int hwdb_main(int argc, char *argv[], void *userdata) { } if (arg_test) - return hwdb_query(arg_test); + return hwdb_query(arg_test, NULL); return 0; } -- cgit v1.2.1