[PATCH] virsh: add check for exclusive options for domstats command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Option --domain cannot be combined with options --list-*.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1143837

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 tools/virsh-domain-monitor.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 6951db2..e683a6d 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -2110,6 +2110,15 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
     const vshCmdOpt *opt = NULL;
     bool ret = false;
 
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-active");
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-inactive");
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-persistent");
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-transient");
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-running");
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-paused");
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-shutoff");
+    VSH_EXCLUSIVE_OPTIONS("domain", "list-other");
+
     if (vshCommandOptBool(cmd, "state"))
         stats |= VIR_DOMAIN_STATS_STATE;
 
-- 
2.0.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]