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>
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"))