[libvirt] [PATCH 4/4] Ignore error from query-cpu-definitions

Daniel P. Berrange berrange at redhat.com
Fri Sep 28 15:21:56 UTC 2012


On Fri, Sep 28, 2012 at 03:58:23PM +0100, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> Some architectures provide the query-cpu-definitions command,
> but are set to always return a "GenericError" from it :-(
> Catch this & treat it as if there was an empty list of CPUs
> returned
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c |  2 +-
>  src/qemu/qemu_monitor.c      |  1 -
>  src/qemu/qemu_monitor_json.c | 12 ++++++++++++
>  3 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 682d3e6..2ae6fec 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -2240,7 +2240,7 @@ qemuCapsInitQMP(qemuCapsPtr caps)
>      VIR_DEBUG("Got version %d.%d.%d (%s)",
>                major, minor, micro, NULLSTR(package));
>  
> -    if (!(major >= 1 && minor >= 1 && micro >= 90)) {
> +    if (!(major >= 1 || (major == 1 && minor >= 1))) {
>          VIR_DEBUG("Not new enough for QMP capabilities detection");
>          ret = 0;
>          goto cleanup;

Opps, this was intended for the previous patch.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list