mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Add domainIsUpdated to libxl driver
This commit is contained in:
parent
3df6fd706c
commit
bf7f62519a
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user