On Wed, Jan 29, 2014 at 10:49:26AM -0700, Eric Blake wrote: > Commit 57ddcc23 (v0.9.11) introduced the pmwakeup event, with > an optional 'reason' field reserved for possible future expansion. > But it failed to wire the field through RPC, so even if we do > add a reason in the future, we will be unable to get it back > to the user. > > Worse, commit 7ba5defb (v1.0.0) repeated the same mistake with > the pmsuspend_disk event. Urgh I've caught cases of new events not doing that before and fixed it, guess i missed this one. > > As long as we are adding new RPC calls, we might as well fix > the events to actually match the signature so that we don't have > to add yet another RPC in the future if we do decide to start > using the reason field. > > * src/remote/remote_protocol.x > (remote_domain_event_callback_pmwakeup_msg) > (remote_domain_event_callback_pmsuspend_msg) > (remote_domain_event_callback_pmsuspend_disk_msg): Add reason > field. > * daemon/remote.c (remoteRelayDomainEventPMWakeup) > (remoteRelayDomainEventPMSuspend) > (remoteRelayDomainEventPMSuspendDisk): Pass reason to client. > * src/conf/domain_event.h (virDomainEventPMWakeupNewFromDom) > (virDomainEventPMSuspendNewFromDom) > (virDomainEventPMSuspendDiskNewFromDom): Require additional > parameter. > * src/conf/domain_event.c (virDomainEventPMClass): New class. > (virDomainEventPMDispose): New function. > (virDomainEventPMWakeupNew*, virDomainEventPMSuspendNew*) > (virDomainEventPMSuspendDiskNew*) > (virDomainEventDispatchDefaultFunc): Use new class. > * src/remote/remote_driver.c (remoteDomainBuildEvent*PM*): Pass > reason through. > * src/remote_protocol-structs: Regenerate. > ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list