storagetm: make the synopsis more accurate

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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-08-17 13:21:31 +02:00
parent 9cf35bfa4d
commit 5eb3bf5182
2 changed files with 17 additions and 4 deletions
+13 -3
View File
@@ -28,7 +28,17 @@
<cmdsynopsis>
<command>/usr/lib/systemd/systemd-storagetm</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="opt"><replaceable>DEVICE</replaceable></arg>
<arg choice="plain" rep="repeat"><replaceable>DEVICE</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>/usr/lib/systemd/systemd-storagetm</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain">--all</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>/usr/lib/systemd/systemd-storagetm</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain">--list-devices</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -53,8 +63,8 @@
<literal>ip=dhcp</literal> to assign routable addresses too. For further details see
<citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
<para>Unless the <option>--all</option> switch is used expects one or more block devices or regular files to expose
via NVMe-TCP as argument.</para>
<para>Unless the <option>--list-devices</option> or <option>--all</option> switches are used, one or more
block devices or regular files to expose via NVMe-TCP must be specified as arguments.</para>
</refsect1>
<refsect1>
+4 -1
View File
@@ -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",
);