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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]