The current description suggests that you always have to provide a valid typeVer pointer. But if you want only the libvirt version it's also possible to set type and typeVer to NULL to skip the hypervisor part. --- src/libvirt.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index e4b451e..a8b48ea 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -863,11 +863,12 @@ int virStateActive(void) { * @type: the type of connection/driver looked at * @typeVer: return value for the version of the hypervisor (OUT) * - * Provides two information back, @libVer is the version of the library - * while @typeVer will be the version of the hypervisor type @type against - * which the library was compiled. If @type is NULL, "Xen" is assumed, if - * @type is unknown or not available, an error code will be returned and - * @typeVer will be 0. + * Provides two information back: @libVer is the version of the library + * and will always be set unless an error occurs, in which case an error + * code will be returned. If @typeVer is not NULL it will be set to the + * version of the hypervisor @type against which the library was compiled. + * If @type is NULL, "Xen" is assumed, if @type is unknown or not + * available, an error code will be returned and @typeVer will be 0. * * Returns -1 in case of failure, 0 otherwise, and values for @libVer and * @typeVer have the format major * 1,000,000 + minor * 1,000 + release. -- 1.7.4.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list