Changes:
error: invalid argument: vcpu number out of range 2 > 2
to slightly less confusing:
error: invalid argument: vcpu number out of range 2 > 1
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6996b80..c3ac6d4 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4355,7 +4355,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
     if (vcpu > (priv->nvcpupids-1)) {
         virReportError(VIR_ERR_INVALID_ARG,
                        _("vcpu number out of range %d > %d"),
-                       vcpu, priv->nvcpupids);
+                       vcpu, priv->nvcpupids - 1);
         goto cleanup;
     }
 
-- 
1.8.3.2

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

Reply via email to