On 01/04/2014 07:00 AM, Eric Blake wrote: > Since the introduction of network events, any driver that uses > a single event state object to track both domain and network > events should not include 'domain' in the name of that object. > > * src/test/test_driver.c (_testConn): > s/domainEventState/eventState/, and fix all callers. > * src/remote/remote_driver.c (private_data): Likewise. > and squashing in this, since network events use it too: diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 74da726..fecb9b2 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -151,7 +151,7 @@ static void make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virSto static void make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src); static void make_nonnull_nwfilter(remote_nonnull_nwfilter *nwfilter_dst, virNWFilterPtr nwfilter_src); static void make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src); -static void remoteDomainEventQueue(struct private_data *priv, virObjectEventPtr event); +static void remoteEventQueue(struct private_data *priv, virObjectEventPtr event); /*----------------------------------------------------------------------*/ /* Helper functions for remoteOpen. */ @@ -279,7 +279,7 @@ remoteNetworkBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virNetClientPtr client ATTRIBUTE_UNUSED, void *evdata, void *opaque); -static virNetClientProgramEvent remoteDomainEvents[] = { +static virNetClientProgramEvent remoteEvents[] = { { REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE, remoteDomainBuildEventRTCChange, sizeof(remote_domain_event_rtc_change_msg), @@ -815,8 +815,8 @@ doRemoteOpen(virConnectPtr conn, if (!(priv->remoteProgram = virNetClientProgramNew(REMOTE_PROGRAM, REMOTE_PROTOCOL_VERSION, - remoteDomainEvents, - ARRAY_CARDINALITY(remoteDomainEvents), + remoteEvents, + ARRAY_CARDINALITY(remoteEvents), conn))) goto failed; if (!(priv->lxcProgram = virNetClientProgramNew(LXC_PROGRAM, @@ -4482,7 +4482,7 @@ remoteDomainBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, event = virDomainEventLifecycleNewFromDom(dom, msg->event, msg->detail); virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4504,7 +4504,7 @@ remoteDomainBuildEventReboot(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, event = virDomainEventRebootNewFromDom(dom); virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4526,7 +4526,7 @@ remoteDomainBuildEventRTCChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, event = virDomainEventRTCChangeNewFromDom(dom, msg->offset); virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4548,7 +4548,7 @@ remoteDomainBuildEventWatchdog(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, event = virDomainEventWatchdogNewFromDom(dom, msg->action); virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4573,7 +4573,7 @@ remoteDomainBuildEventIOError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, msg->action); virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4600,7 +4600,7 @@ remoteDomainBuildEventIOErrorReason(virNetClientProgramPtr prog ATTRIBUTE_UNUSED virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } static void @@ -4623,7 +4623,7 @@ remoteDomainBuildEventBlockJob(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } static void @@ -4679,7 +4679,7 @@ remoteDomainBuildEventGraphics(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); return; error: @@ -4725,7 +4725,7 @@ remoteDomainBuildEventControlError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4752,7 +4752,7 @@ remoteDomainBuildEventDiskChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4777,7 +4777,7 @@ remoteDomainBuildEventTrayChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } static void @@ -4799,7 +4799,7 @@ remoteDomainBuildEventPMWakeup(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } static void @@ -4821,7 +4821,7 @@ remoteDomainBuildEventPMSuspend(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4843,7 +4843,7 @@ remoteDomainBuildEventBalloonChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED event = virDomainEventBalloonChangeNewFromDom(dom, msg->actual); virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4866,7 +4866,7 @@ remoteDomainBuildEventPMSuspendDisk(virNetClientProgramPtr prog ATTRIBUTE_UNUSED virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4889,7 +4889,7 @@ remoteDomainBuildEventDeviceRemoved(virNetClientProgramPtr prog ATTRIBUTE_UNUSED virDomainFree(dom); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -4911,7 +4911,7 @@ remoteNetworkBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, event = virNetworkEventLifecycleNew(net->name, net->uuid, msg->event, msg->detail); virNetworkFree(net); - remoteDomainEventQueue(priv, event); + remoteEventQueue(priv, event); } @@ -6799,7 +6799,7 @@ done: } static void -remoteDomainEventQueue(struct private_data *priv, virObjectEventPtr event) +remoteEventQueue(struct private_data *priv, virObjectEventPtr event) { virObjectEventStateQueue(priv->eventState, event); } -- 1.8.4.2 -- 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