summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-hwdb.c
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/udev/udevadm-hwdb.c
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/udev/udevadm-hwdb.c')
-rw-r--r--src/udev/udevadm-hwdb.c2
1 files changed, 1 insertions, 1 deletions
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;
}