[libvirt] [PATCH 1/8] Convert Xen & VBox drivers to use virDomainEventState

Eric Blake eblake at redhat.com
Wed Dec 14 20:50:24 UTC 2011


On 12/13/2011 05:38 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> The Xen & VBox drivers deal with callbacks & dispatching of
> events directly. All the other drivers use a timer to dispatch
> events from a clean stack state, rather than deep inside the
> drivers. Convert Xen & VBox over to virDomainEventState so
> that they match behaviour of other drivers
> 
> @@ -323,17 +326,16 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
>          return VIR_DRV_OPEN_ERROR;
>      }
>  
> -    /* Allocate callback list */
> -    if (VIR_ALLOC(cbList) < 0) {
> -        virReportOOMError();
> +    if (!(priv->domainEvents = virDomainEventStateNew(xenDomainEventFlush,
> +                                                      priv,
> +                                                      NULL,
> +                                                      NULL))) {

This last parameter should be false, not NULL (wonder why the compiler
didn't complain).  It all goes away in later patches, but it might as
well be type-correct while it exists.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111214/9c9a6573/attachment-0001.sig>


More information about the libvir-list mailing list