From: Markus Groß Date: Wed, 6 Apr 2011 08:58:39 +0000 (+0200) Subject: Add domainIsUpdated to libxl driver X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bf7f62519ac0835744c033fabc93b2b5896c0810;p=libvirt.git Add domainIsUpdated to libxl driver --- diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 8cc4469007..e95c403b51 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -2329,6 +2329,28 @@ libxlDomainIsPersistent(virDomainPtr dom) return ret; } +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, @@ -2456,7 +2478,7 @@ static virDriver libxlDriver = { NULL, /* IsSecure */ libxlDomainIsActive, /* DomainIsActive */ libxlDomainIsPersistent, /* DomainIsPersistent */ - NULL, /* domainIsUpdated */ + libxlDomainIsUpdated, /* domainIsUpdated */ NULL, /* cpuCompare */ NULL, /* cpuBaseline */ NULL, /* domainGetJobInfo */