From 5eb3bf51825f4606c4ff4e8efa8f11dbcb5253a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 16 Aug 2026 15:29:39 +0200 Subject: [PATCH] storagetm: make the synopsis more accurate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit parse_argv() requires at least one DEVICE unless --all is given, and refuses DEVICE arguments when --all is given, so "[DEVICE…]" described neither mode correctly. Spell out the three modes as separate synopsis lines, like pcrextend and inhibit do, and update the man page to match. --- man/systemd-storagetm.service.xml | 16 +++++++++++++--- src/storagetm/storagetm.c | 5 ++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/man/systemd-storagetm.service.xml b/man/systemd-storagetm.service.xml index 6172190157..b49a27feb0 100644 --- a/man/systemd-storagetm.service.xml +++ b/man/systemd-storagetm.service.xml @@ -28,7 +28,17 @@ /usr/lib/systemd/systemd-storagetm OPTIONS - DEVICE + DEVICE + + + /usr/lib/systemd/systemd-storagetm + OPTIONS + --all + + + /usr/lib/systemd/systemd-storagetm + OPTIONS + --list-devices @@ -53,8 +63,8 @@ ip=dhcp to assign routable addresses too. For further details see systemd-network-generator.service8. - Unless the switch is used expects one or more block devices or regular files to expose - via NVMe-TCP as argument. + Unless the or switches are used, one or more + block devices or regular files to expose via NVMe-TCP must be specified as arguments. diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c index 3402212cb5..91a4763307 100644 --- a/src/storagetm/storagetm.c +++ b/src/storagetm/storagetm.c @@ -49,7 +49,10 @@ STATIC_DESTRUCTOR_REGISTER(arg_nqn, freep); COMMAND( "systemd-storagetm\0", "Expose a block device or regular file as NVMe-TCP volume.", - .argspec = "[DEVICE…]\0", + .argspec = + "DEVICE…\0" + "--all\0" + "--list-devices\0", .man_pages = "systemd-storagetm.8\0", );