[PATCH 2/6] virt-admin: Make --timeout of daemon-timeout positional argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 docs/manpages/virt-admin.rst | 2 +-
 tools/virt-admin.c           | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/manpages/virt-admin.rst b/docs/manpages/virt-admin.rst
index 5108781636..54a6512ef7 100644
--- a/docs/manpages/virt-admin.rst
+++ b/docs/manpages/virt-admin.rst
@@ -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.
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 1805618035..3eb4f0f3fd 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -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}
-- 
2.44.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux