virt-admin: Make --timeout of daemon-timeout positional argument

We currently require full argument specification:

  virt-admin daemon-timeout --timeout X

Well, the '--timeout' feels a bit redundant. Turn the argument
into a positional so that the following works too:

  virt-admin daemon-timeout X

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Michal Privoznik committed 2024-05-28 08:51:37 +02:00
1 parent 8877646665
commit a0c45432e0
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -320,7 +320,7 @@ daemon-timeout
::
daemon-timeout --timeout NUM
daemon-timeout [--timeout] NUM
Sets the daemon timeout to the value of '--timeout' argument. Use ``--timeout 0``
to disable auto-shutdown of the daemon.
+1
View File
@@ -1009,6 +1009,7 @@ static const vshCmdOptDef opts_daemon_timeout[] = {
{.name = "timeout",
.type = VSH_OT_INT,
.required = true,
.positional = true,
.help = N_("number of seconds the daemon will run without any active connection"),
},
{.name = NULL}