From 92a97a2b9d0110c1fe9d67b2feab33a4b9b51ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 18 Aug 2026 13:00:33 +0200 Subject: [PATCH] dissect: describe the mount.ddi helper interface Add a second COMMAND() for the mount.ddi helper namespace, like for mount.storage and mount.mstack, so that it is exposed by --introspect-cli too. Fixes 1a54ce154c9c5485b77c866327c530d9a1457094 + 66246c98b5435be57a8cfd01641183bb4e6cedea. --- src/dissect/dissect.c | 7 +++++++ test/units/TEST-74-AUX-UTILS.introspect-cli.sh | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index ed0182950d..55f36b1d86 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -712,6 +712,13 @@ static int parse_argv(int argc, char *argv[]) { return 1; } +COMMAND( + "mount.ddi\0", + "External helper for mount.8 to mount Discoverable Disk Images (DDIs).", + .man_pages = "systemd-dissect.1\0", + .option_namespace = "mount.ddi", +); + static int parse_argv_as_mount_helper(int argc, char *argv[]) { const char *options = NULL; bool fake = false; diff --git a/test/units/TEST-74-AUX-UTILS.introspect-cli.sh b/test/units/TEST-74-AUX-UTILS.introspect-cli.sh index fc6e7db1ac..8da538ef12 100755 --- a/test/units/TEST-74-AUX-UTILS.introspect-cli.sh +++ b/test/units/TEST-74-AUX-UTILS.introspect-cli.sh @@ -140,6 +140,9 @@ storagectl --introspect-cli | jq -e \ systemd-clonesetup --introspect-cli | jq -e \ '.commands[0].verbs | map(.names[0]) | sort == ["add", "remove"]' +systemd-dissect --introspect-cli | jq -e \ + '[.commands[].names[0]] | sort == ["mount.ddi", "systemd-dissect"]' + systemd-id128 --introspect-cli | jq -e \ '.commands[0].verbs | map(.names[0]) | contains(["new", "machine-id", "show", "help"])'