From: Daniel Henrique Barboza Date: Wed, 14 Nov 2018 19:52:03 +0000 (-0200) Subject: qemu_process.c: adding maxCpus value to error message X-Git-Tag: v4.10.0-rc1~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aad8432f699d3a876e6651a1b1d63d57e4d9e33;p=thirdparty%2Flibvirt.git qemu_process.c: adding maxCpus value to error message Adding the maxCpus value in the error message of qemuValidateCpuCount allows the user to set an acceptable maxCpus count without knowing QEMU internals. x86 guests, that might have been created prior to the x86 qemuDomainDefValidate maxCpus check code (that validates the maxCpus value in editing time), will also benefit from this change. Signed-off-by: Daniel Henrique Barboza Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 874451ce72..d6496c2622 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3911,8 +3911,9 @@ qemuValidateCpuCount(virDomainDefPtr def, } if (maxCpus > 0 && virDomainDefGetVcpusMax(def) > maxCpus) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Maximum CPUs greater than specified machine type limit")); + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Maximum CPUs greater than specified machine " + "type limit %u"), maxCpus); return -1; }