[libvirt] [libvirt-python 09/18] virNodeGetCPUMap API not added until 1.0.0
Eric Blake
eblake at redhat.com
Tue Nov 19 15:19:03 UTC 2013
On 11/18/2013 03:44 PM, Doug Goldstein wrote:
> ---
> libvirt-override.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
ACK.
> +#if LIBVIR_CHECK_VERSION(1,0,0)
Style-wise, I would have written LIBVIR_CHECK_VERSION(1, 0, 0), but I'm
not sure the whitespace difference matters.
> LIBVIRT_BEGIN_ALLOW_THREADS;
> i_retval = virNodeGetCPUMap(conn, NULL, NULL, 0);
> LIBVIRT_END_ALLOW_THREADS;
> +#endif /* LIBVIR_CHECK_VERSION(1,0,0) */
>
> if (i_retval < 0) {
> /* fallback: use nodeinfo */
Works because of the fallback code (we have to call at least one libvirt
function before returning error so that the libvirt error api has
something to report).
--
Eric Blake eblake 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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131119/7ebd2c24/attachment-0001.sig>
More information about the libvir-list
mailing list