]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: limit completion of 'domhostname' to active domains
authorPino Toscano <ptoscano@redhat.com>
Wed, 20 Nov 2019 13:24:33 +0000 (14:24 +0100)
committerPino Toscano <ptoscano@redhat.com>
Fri, 22 Nov 2019 10:36:51 +0000 (11:36 +0100)
Getting the hostname of a guest usually requires a in-guest agent,
or generally can be determined only on active domains.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain.c

index b248a15c16a2bcdc31ac367ced2ad8a8f4791c1a..6be9780836511b3adfb4a4078111c0c7d025badb 100644 (file)
@@ -11668,7 +11668,7 @@ static const vshCmdInfo info_domhostname[] = {
 };
 
 static const vshCmdOptDef opts_domhostname[] = {
-    VIRSH_COMMON_OPT_DOMAIN_FULL(0),
+    VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_ACTIVE),
     {.name = NULL}
 };