]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: process: Fix off-by-one in vcpu order duplicate error message
authorPeter Krempa <pkrempa@redhat.com>
Wed, 14 Sep 2016 03:58:33 +0000 (05:58 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 30 Sep 2016 06:25:20 +0000 (08:25 +0200)
The bitmap indexes for the order duplicate check are shifted to 0 since
vcpu order 0 is not allowed. The error message doesn't need such
treating though.

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

src/qemu/qemu_process.c

index 27d04a4346f013422ada8d9e357cb26f9e2c5f09..e4f27eaf5e3e5545a49a3deb8c49e349dfae2117 100644 (file)
@@ -4807,7 +4807,7 @@ qemuProcessValidateHotpluggableVcpus(virDomainDefPtr def)
         if (vcpu->order != 0) {
             if (virBitmapIsBitSet(ordermap, vcpu->order - 1)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("duplicate vcpu order '%u'"), vcpu->order - 1);
+                               _("duplicate vcpu order '%u'"), vcpu->order);
                 goto cleanup;
             }