diff options
author | 2010-11-15 11:23:35 +0800 | |
---|---|---|
committer | 2010-11-23 15:04:42 -0700 | |
commit | c1fb91661842c41b5679d58a1d8de5b0bea0d318 (patch) | |
tree | eccfa2cc14ac6e807bcb41d9691ac8dd0521a982 | |
parent | implement the remote protocol (diff) | |
download | libvirt-c1fb91661842c41b5679d58a1d8de5b0bea0d318.tar.gz libvirt-c1fb91661842c41b5679d58a1d8de5b0bea0d318.tar.bz2 libvirt-c1fb91661842c41b5679d58a1d8de5b0bea0d318.zip |
implement callback function for qemu driver
* src/qemu/qemu_driver.c (add function qemuDomainIsUpdated)
-rw-r--r-- | src/qemu/qemu_driver.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a69dd4506..f00d8a359 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4781,6 +4781,26 @@ cleanup: return ret; } +static int qemuDomainIsUpdated(virDomainPtr dom) +{ + struct qemud_driver *driver = dom->conn->privateData; + virDomainObjPtr obj; + int ret = -1; + + qemuDriverLock(driver); + obj = virDomainFindByUUID(&driver->domains, dom->uuid); + qemuDriverUnlock(driver); + if (!obj) { + qemuReportError(VIR_ERR_NO_DOMAIN, NULL); + goto cleanup; + } + ret = obj->updated; + +cleanup: + if (obj) + virDomainObjUnlock(obj); + return ret; +} static int qemudGetVersion(virConnectPtr conn, unsigned long *version) { struct qemud_driver *driver = conn->privateData; @@ -13249,7 +13269,7 @@ static virDriver qemuDriver = { qemuIsSecure, /* isSecure */ qemuDomainIsActive, /* domainIsActive */ qemuDomainIsPersistent, /* domainIsPersistent */ - NULL, /* domainIsUpdated */ + qemuDomainIsUpdated, /* domainIsUpdated */ qemuCPUCompare, /* cpuCompare */ qemuCPUBaseline, /* cpuBaseline */ qemuDomainGetJobInfo, /* domainGetJobInfo */ |