[libvirt] [PATCH 01/12] Rename virDriver to virHypervisorDriver
Eric Blake
eblake at redhat.com
Wed Oct 22 22:46:56 UTC 2014
On 10/22/2014 11:14 AM, Daniel P. Berrange wrote:
> To prepare for introducing a single global driver, rename the
> virDriver struct to virHypervisorDriver and the registration
> API to virRegisterHypervisorDriver()
> ---
Mostly mechanical.
> +++ b/src/datatypes.h
> @@ -336,7 +336,7 @@ struct _virConnect {
> virURIPtr uri; /* connection URI */
>
> /* The underlying hypervisor driver and network driver. */
> - virDriverPtr driver;
> + virHypervisorDriverPtr driver;
> virNetworkDriverPtr networkDriver;
> virInterfaceDriverPtr interfaceDriver;
> virStorageDriverPtr storageDriver;
While touching this, it might be worth nuking the intermediate spaces
since we don't have anything aligned.
> +++ b/src/remote/remote_driver.c
> @@ -78,7 +78,6 @@ VIR_LOG_INIT("remote.remote_driver");
> limit, params, nparams)
>
> static bool inside_daemon = false;
> -static virDriverPtr remoteDriver = NULL;
>
> struct private_data {
> virMutex lock;
> @@ -8030,7 +8029,7 @@ unsigned long remoteVersion(void)
> return REMOTE_PROTOCOL_VERSION;
> }
>
> -static virDriver remote_driver = {
> +static virHypervisorDriver hypervisor_driver = {
> .no = VIR_DRV_REMOTE,
> .name = "remote",
> .connectOpen = remoteConnectOpen, /* 0.3.0 */
> @@ -8403,9 +8402,7 @@ static virStateDriver state_driver = {
> int
> remoteRegister(void)
> {
> - remoteDriver = &remote_driver;
> -
> - if (virRegisterDriver(&remote_driver) < 0)
> + if (virRegisterHypervisorDriver(&hypervisor_driver) < 0)
> return -1;
This is the only non-mechanical change I saw, and it looks like a
correct simplification.
ACK.
--
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: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141022/c823ba22/attachment-0001.sig>
More information about the libvir-list
mailing list