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
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list