1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

implement public API virDomainIsUpdated

* src/libvirt.c
This commit is contained in:
Osier Yang 2010-11-18 19:12:06 +08:00 committed by Eric Blake
parent 37a02efd71
commit 20a017df68

View File

@ -11438,6 +11438,39 @@ error:
return -1;
}
/**
* virDomainIsUpdated:
* @dom: pointer to the domain object
*
* Determine if the domain has been updated.
*
* Returns 1 if updated, 0 if not, -1 on error
*/
int virDomainIsUpdated(virDomainPtr dom)
{
DEBUG("dom=%p", dom);
virResetLastError();
if (!VIR_IS_CONNECTED_DOMAIN(dom)) {
virLibConnError(NULL, VIR_ERR_INVALID_CONN, __FUNCTION__);
virDispatchError(NULL);
return (-1);
}
if (dom->conn->driver->domainIsUpdated) {
int ret;
ret = dom->conn->driver->domainIsUpdated(dom);
if (ret < 0)
goto error;
return ret;
}
virLibConnError(dom->conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
error:
virDispatchError(dom->conn);
return -1;
}
/**
* virNetworkIsActive:
* @net: pointer to the network object