]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
tools: fix output of list with state-shutoff
authorWei Jiangang <weijg.fnst@cn.fujitsu.com>
Mon, 30 Nov 2015 10:08:40 +0000 (18:08 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 30 Nov 2015 14:08:44 +0000 (15:08 +0100)
Due to the default of flags is VIR_CONNECT_LIST_DOMAINS_ACTIVE,
It doesn't show the domains that have been shutdown when we use
'virsh list' with only --state-shutoff.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
tools/virsh-domain-monitor.c

index abc18e5c4d671e60d5441775c11d22aa34a3a609..64ec03dfc0cb17b9385162473d5f7eb8098c54b3 100644 (file)
@@ -1873,7 +1873,8 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
     unsigned int flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE;
 
     /* construct filter flags */
-    if (vshCommandOptBool(cmd, "inactive"))
+    if (vshCommandOptBool(cmd, "inactive") ||
+        vshCommandOptBool(cmd, "state-shutoff"))
         flags = VIR_CONNECT_LIST_DOMAINS_INACTIVE;
 
     if (vshCommandOptBool(cmd, "all"))