From 8dd47ead18ba64ee231dcef0a54e1b6ad797051e Mon Sep 17 00:00:00 2001 From: Wei Jiangang Date: Mon, 30 Nov 2015 18:08:40 +0800 Subject: [PATCH] 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 --- tools/virsh-domain-monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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")) -- 2.39.5