[libvirt] [PATCH 2/4] virsh: common code for waiting for an event

Daniel P. Berrange berrange at redhat.com
Thu Feb 20 17:30:18 UTC 2014


On Fri, Feb 14, 2014 at 05:21:39PM -0700, Eric Blake wrote:
> I plan to add 'virsh event' to virsh-domain.c and 'virsh
> net-event' to virsh-network.c; but as they will share quite
> a bit of common boilerplate, it's better to set that up now
> in virsh.c.
> 
> * tools/virsh.h (_vshControl): Add fields.
> (vshEventStart, vshEventWait, vshEventDone, vshEventCleanup): New
> prototypes.
> * tools/virsh.c (vshEventFd, vshEventOldAction, vshEventInt)
> (vshEventTimeout): New helper variables and functions.
> (vshEventStart, vshEventWait, vshEventDone, vshEventCleanup):
> Implement new functions.
> (vshInit, vshDeinit, main): Manage event timeout.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  tools/virsh.c | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  tools/virsh.h |  13 +++++
>  2 files changed, 172 insertions(+), 1 deletion(-)

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 :|




More information about the libvir-list mailing list