]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: libxl_get_max_cpus returning a libxl error from 4.4 onward
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 18 Dec 2013 14:39:12 +0000 (15:39 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 18 Dec 2013 16:08:41 +0000 (17:08 +0100)
commit284d2fc29946b7f5edeb520c0d5c97a3be4c57aa
tree04b451104298d2dc342c554b780be90181baa85e
parentef56cc43d1e2dd7e8fd8f5b9cb11c7a7b9ba65b3
libxl: libxl_get_max_cpus returning a libxl error from 4.4 onward

Starting from commit 2e82c18c in Xen (will be included in Xen 4.4)
both libxl_get_max_cpus() and libxl_get_max_nodes() start returning
a proper libxl error code, in case of failure. This patch fixes
this in the libxl driver.

Note that, although it is now basically impossible for them to return
0, that would, theoretically, still be wrong. Also, checking that the
returned value is '<= 0' makes the code correct for both Xen 4.4 and
Xen 4.3 (and 4.2), and that is why we go for it (rather than
just '< 0').

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Jim Fehlig <jfehlig@suse.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/libxl/libxl_driver.c