提交 c1fb9166 编写于 作者: O Osier Yang 提交者: Eric Blake

implement callback function for qemu driver

* src/qemu/qemu_driver.c (add function qemuDomainIsUpdated)
上级 313215e1
...@@ -4781,6 +4781,26 @@ cleanup: ...@@ -4781,6 +4781,26 @@ cleanup:
return ret; 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) { static int qemudGetVersion(virConnectPtr conn, unsigned long *version) {
struct qemud_driver *driver = conn->privateData; struct qemud_driver *driver = conn->privateData;
...@@ -13249,7 +13269,7 @@ static virDriver qemuDriver = { ...@@ -13249,7 +13269,7 @@ static virDriver qemuDriver = {
qemuIsSecure, /* isSecure */ qemuIsSecure, /* isSecure */
qemuDomainIsActive, /* domainIsActive */ qemuDomainIsActive, /* domainIsActive */
qemuDomainIsPersistent, /* domainIsPersistent */ qemuDomainIsPersistent, /* domainIsPersistent */
NULL, /* domainIsUpdated */ qemuDomainIsUpdated, /* domainIsUpdated */
qemuCPUCompare, /* cpuCompare */ qemuCPUCompare, /* cpuCompare */
qemuCPUBaseline, /* cpuBaseline */ qemuCPUBaseline, /* cpuBaseline */
qemuDomainGetJobInfo, /* domainGetJobInfo */ qemuDomainGetJobInfo, /* domainGetJobInfo */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册