From: Wei Jiangang Date: Mon, 30 Nov 2015 10:08:40 +0000 (+0800) Subject: tools: fix output of list with state-shutoff X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8dd47ead18ba64ee231dcef0a54e1b6ad797051e;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git tools: fix output of list with state-shutoff 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 --- diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index abc18e5c4..64ec03dfc 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -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"))