udevadm-hwdb: use common verb help and add --introspect-cli

The custom help() is replaced by the common verb help, which derives the
synopsis, abstract, and option list from the verb declaration in udevadm.c
and the "udevadm-control" option namespace. The new VERB_DEPRECATED flag
is used.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-08-28 09:47:36 +02:00
parent da4f84ae4a
commit 0ba8647c6d
3 changed files with 12 additions and 26 deletions
@@ -214,6 +214,10 @@ udevadm --introspect-cli | jq -e \
'.commands[] | select(.names[0] == "udevadm") | .verbs[] | select(.names[0] == "info") |
[.options[].names[-1]] | contains(["--query", "--json", "--no-pager"])'
udevadm --introspect-cli | jq -e \
'.commands[] | select(.names[0] == "udevadm") | .verbs[] |
select(.names[0] == "hwdb") | .isDeprecated == true'
# systemd is optionally a multicall binary that also provides systemd-executor
if [[ "$(readlink "$(command -v systemd-executor)" 2>/dev/null)" == systemd ]]; then
systemd --introspect-cli | jq -e \