[libvirt] [PATCH] qemu: Do not fail virConnectCompareCPU if host CPU is not known
Eric Blake
eblake at redhat.com
Fri Jul 13 20:40:10 UTC 2012
On 07/12/2012 05:06 AM, Jiri Denemark wrote:
> When host CPU could not be properly detected, virConnectCompareCPU will
> just report that any CPU is incompatible with host CPU instead of
> failing.
> ---
> src/qemu/qemu_driver.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index dc04d13..6d3b8d5 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -9419,8 +9419,8 @@ qemuCPUCompare(virConnectPtr conn,
> qemuDriverLock(driver);
>
> if (!driver->caps || !driver->caps->host.cpu) {
> - qemuReportError(VIR_ERR_OPERATION_INVALID,
> - "%s", _("cannot get host CPU capabilities"));
> + VIR_WARN("cannot get host CPU capabilities");
> + ret = VIR_CPU_COMPARE_INCOMPATIBLE;
Seems simple enough. And not detecting the host CPU should be
relatively rare.
ACK.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120713/5f3555c4/attachment-0001.sig>
More information about the libvir-list
mailing list