Re: [PATCH] Avoid virGetVersion failure on specific driver support configurations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/6/6 Eric Blake <eblake@xxxxxxxxxx>:
> On 06/06/2011 05:59 AM, Matthias Bolte wrote:
>> When virConnectGetType is called on a remote connection then the remote
>> driver returns the type of the underlying driver on the server side, for
>> example QEMU. Then virGetVersion compares hvType to a set of strings that
>> depend on configure options and returns LIBVIR_VERSION_NUMBER in most
>> cases. Now this fails in case libvirt on the client side is just compiled
>> with the remote driver enabled only and the server side has the actual
>> driver such as the QEMU driver.
>
> Conditional ACK, with docs fixed:
>
>> Â * Provides information on up to two versions: @libVer is the version of the
>
> We now provide only one version.
>
>> Â * 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.
>> + * error code will be returned. If @typeVer is not NULL it should have been be
>
> "been be"
>
>> + * set to the version of the hypervisor @type against which the library was
>> + * compiled. Due to a design problem this doesn't work as intented. Therefore,
>
> intended
>
>> + * this function is only usefull to obtain the local library version number via
>
> useful
>
>> + * @libVer. To get the version of the running hypervisor use the
>> + * virConnectGetVersion function instead. To get the libvirt library version
>> + * used by a connection use the virConnectGetLibVersion instead.
>
> I'm thinking this looks better:
>
> Â* virGetVersion:
> Â* @libVer: return value for the library version (OUT)
> Â* @type: ignored; pass NULL
> Â* @typeVer: pass NULL; for historical purposes duplicates @libVer if
> Â* non-NULL
> Â*
> Â* Provides version information. @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. @typeVer exists for historical
> Â* compatibility; if it is not NULL it will duplicate @libVer (it was
> Â* originally intended to return hypervisor information based on @type,
> Â* but due to the design of remote clients this is not reliable). To
> Â* get the version of the running hypervisor use the
> Â* virConnectGetVersion function instead. To get the libvirt library
> Â* version used by a connection use the virConnectGetLibVersion instead.
>

Yes, much better, thanks :)

Pushed with improved documentation.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]