• E
    virsh: common code for waiting for an event · 4c29530d
    Eric Blake 提交于
    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: NEric Blake <eblake@redhat.com>
    4c29530d
virsh.c 92.4 KB