Blame SOURCES/libvirt-virsh-domain-Mark-live-and-config-mutually-exclusive-in-vcpucount.patch

c401cc
From 40dc061be172fcd64be29054782254c5c0d3786f Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <40dc061be172fcd64be29054782254c5c0d3786f.1385135432.git.jdenemar@redhat.com>
c401cc
From: Peter Krempa <pkrempa@redhat.com>
c401cc
Date: Mon, 11 Nov 2013 11:30:02 +0100
c401cc
Subject: [PATCH] virsh-domain: Mark --live and --config mutually exclusive in
c401cc
 vcpucount
c401cc
c401cc
The 'vcpucount' command is a getter command for the vCPUu count. When
c401cc
one or more of the filtering flags are specified the command returns the
c401cc
value only for the selected combination. In this case the --live and
c401cc
--config combination isn't valid. This however didn't cause errors as
c401cc
the combination of flags was rejected by the libvirt API but then the
c401cc
fallback code kicked in and requested the count in a way where the clash
c401cc
of the flags didn't matter.
c401cc
c401cc
Mark the flag combination mutually exclusive so that users aren't
c401cc
confused.
c401cc
c401cc
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1024245
c401cc
(cherry picked from commit bf45db6041c207e78e6a3185ceaf278b09e21561)
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 tools/virsh-domain.c | 1 +
c401cc
 1 file changed, 1 insertion(+)
c401cc
c401cc
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
c401cc
index b4faa69..b692299 100644
c401cc
--- a/tools/virsh-domain.c
c401cc
+++ b/tools/virsh-domain.c
c401cc
@@ -5345,6 +5345,7 @@ cmdVcpucount(vshControl *ctl, const vshCmd *cmd)
c401cc
     if (!maximum && !active && current)
c401cc
         current = false;
c401cc
 
c401cc
+    VSH_EXCLUSIVE_OPTIONS_VAR(live, config)
c401cc
     VSH_EXCLUSIVE_OPTIONS_VAR(current, live);
c401cc
     VSH_EXCLUSIVE_OPTIONS_VAR(current, config);
c401cc
     VSH_EXCLUSIVE_OPTIONS_VAR(active, maximum);
c401cc
-- 
c401cc
1.8.4.4
c401cc