提交 8dd47ead 编写于 作者: W Wei Jiangang 提交者: Martin Kletzander

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: NWei Jiangang <weijg.fnst@cn.fujitsu.com>
上级 90f3c0d7
......@@ -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"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册