]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virt-admin: Make --timeout of daemon-timeout positional argument
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 23 May 2024 09:42:46 +0000 (11:42 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 28 May 2024 06:51:37 +0000 (08:51 +0200)
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>
docs/manpages/virt-admin.rst
tools/virt-admin.c

index 5108781636693b715e86635f4fbe7ce1fabf11d8..54a6512ef7a04e4630b7be9b5dd5b562c5a614bb 100644 (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.
index 18056180355de559f9e4ef42b9b6f12166e2e405..3eb4f0f3fddea7a7a869de1e52b8915913510b5c 100644 (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}