]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh-domain: Mark --live and --config mutually exclusive in vcpucount
authorPeter Krempa <pkrempa@redhat.com>
Wed, 30 Oct 2013 12:58:09 +0000 (13:58 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 11 Nov 2013 09:52:03 +0000 (10:52 +0100)
The 'vcpucount' command is a getter command for the vCPUu count. When
one or more of the filtering flags are specified the command returns the
value only for the selected combination. In this case the --live and
--config combination isn't valid. This however didn't cause errors as
the combination of flags was rejected by the libvirt API but then the
fallback code kicked in and requested the count in a way where the clash
of the flags didn't matter.

Mark the flag combination mutually exclusive so that users aren't
confused.

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

tools/virsh-domain.c

index 59e3d8df3a7df63cc3d666d75247ef961a408cc9..60abd3da9d696c61fe11fc6ca9223c6e25bc9783 100644 (file)
@@ -5331,6 +5331,7 @@ cmdVcpucount(vshControl *ctl, const vshCmd *cmd)
     if (!maximum && !active && current)
         current = false;
 
+    VSH_EXCLUSIVE_OPTIONS_VAR(live, config)
     VSH_EXCLUSIVE_OPTIONS_VAR(current, live);
     VSH_EXCLUSIVE_OPTIONS_VAR(current, config);
     VSH_EXCLUSIVE_OPTIONS_VAR(active, maximum);