mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
implement public API virDomainIsUpdated
* src/libvirt.c
This commit is contained in:
parent
37a02efd71
commit
20a017df68
@ -11438,6 +11438,39 @@ error:
|
|||||||
return -1;
|
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:
|
* virNetworkIsActive:
|
||||||
* @net: pointer to the network object
|
* @net: pointer to the network object
|
||||||
|
Loading…
Reference in New Issue
Block a user