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

Re: [libvirt] [PATCH 1/4] Add domainIsUpdated to libxl driver



Markus Groß wrote:
> ---
>  src/libxl/libxl_driver.c |   24 +++++++++++++++++++++++-
>  1 files changed, 23 insertions(+), 1 deletions(-)
>
> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> index 8cc4469..e95c403 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c
> @@ -2330,6 +2330,28 @@ libxlDomainIsPersistent(virDomainPtr dom)
>  }
>  
>  static int
> +libxlDomainIsUpdated(virDomainPtr dom)
> +{
> +    libxlDriverPrivatePtr driver = dom->conn->privateData;
> +    virDomainObjPtr vm;
> +    int ret = -1;
> +
> +    libxlDriverLock(driver);
> +    vm = virDomainFindByUUID(&driver->domains, dom->uuid);
> +    libxlDriverUnlock(driver);
> +    if (!vm) {
> +        libxlError(VIR_ERR_NO_DOMAIN, NULL);
> +        goto cleanup;
> +    }
> +    ret = vm->updated;
> +
> +cleanup:
> +    if (vm)
> +        virDomainObjUnlock(vm);
> +    return ret;
> +}
> +
> +static int
>  libxlDomainEventRegisterAny(virConnectPtr conn, virDomainPtr dom, int eventID,
>                              virConnectDomainEventGenericCallback callback,
>                              void *opaque, virFreeCallback freecb)
> @@ -2456,7 +2478,7 @@ static virDriver libxlDriver = {
>      NULL,                       /* IsSecure */
>      libxlDomainIsActive,        /* DomainIsActive */
>      libxlDomainIsPersistent,    /* DomainIsPersistent */
> -    NULL,                       /* domainIsUpdated */
> +    libxlDomainIsUpdated,       /* domainIsUpdated */
>      NULL,                       /* cpuCompare */
>      NULL,                       /* cpuBaseline */
>      NULL,                       /* domainGetJobInfo */
>   

ACK, and pushed.  Thanks Markus.

Regards,
Jim


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