[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Add domain events support to UML driver



On Mon, Jul 04, 2011 at 13:32:23 +0100, Daniel P. Berrange wrote:
> * src/uml_conf.h: Add queue for dispatch of domain events
> * src/uml_driver.c: Trigger domain events upon important lifecycle transitions

Does it mean someone is actually using UML? :-)

> diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
> index 91591f1..d0736df 100644
> --- a/src/uml/uml_driver.c
> +++ b/src/uml/uml_driver.c
...
> @@ -2208,6 +2282,114 @@ cleanup:
>  }
>  
>  
> +static int
> +umlDomainEventRegister(virConnectPtr conn,
> +                       virConnectDomainEventCallback callback,
> +                       void *opaque,
> +                       virFreeCallback freecb)
> +{
> +    struct uml_driver *driver = conn->privateData;
> +    int ret;
> +
> +    umlDriverLock(driver);
> +    ret = virDomainEventCallbackListAdd(conn,
> +                                        driver->domainEventState->callbacks,
> +                                        callback, opaque, freecb);
> +    umlDriverUnlock(driver);
> +
> +    return ret;
> +}
> +static int
> +umlDomainEventDeregister(virConnectPtr conn,
> +                         virConnectDomainEventCallback callback)
> +{
> +    struct uml_driver *driver = conn->privateData;
> +    int ret;
> +
> +    umlDriverLock(driver);
> +    ret = virDomainEventStateDeregister(conn,
> +                                        driver->domainEventState,
> +                                        callback);
> +    umlDriverUnlock(driver);
> +
> +    return ret;
> +}
> +static int
> +umlDomainEventRegisterAny(virConnectPtr conn,
...

Nit: an empty line is missing between these two functions.

ACK with that fixed.

Jirka


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]