destroy: Implement internal API for vmware driver

This commit is contained in:
Michal Privoznik 2011-07-21 10:01:44 +02:00
parent 6ec7195c01
commit 73838d331f
1 changed files with 11 additions and 1 deletions

View File

@ -312,12 +312,15 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
}
static int
vmwareDomainShutdown(virDomainPtr dom)
vmwareDomainShutdownFlags(virDomainPtr dom,
unsigned int flags)
{
struct vmware_driver *driver = dom->conn->privateData;
virDomainObjPtr vm;
int ret = -1;
virCheckFlags(0, -1);
vmwareDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
@ -350,6 +353,12 @@ vmwareDomainShutdown(virDomainPtr dom)
return ret;
}
static int
vmwareDomainShutdown(virDomainPtr dom)
{
return vmwareDomainShutdownFlags(dom, 0);
}
static int
vmwareDomainSuspend(virDomainPtr dom)
{
@ -968,6 +977,7 @@ static virDriver vmwareDriver = {
.domainShutdown = vmwareDomainShutdown, /* 0.8.7 */
.domainReboot = vmwareDomainReboot, /* 0.8.7 */
.domainDestroy = vmwareDomainShutdown, /* 0.8.7 */
.domainDestroyFlags = vmwareDomainShutdownFlags, /* 0.9.4 */
.domainGetOSType = vmwareGetOSType, /* 0.8.7 */
.domainGetInfo = vmwareDomainGetInfo, /* 0.8.7 */
.domainGetState = vmwareDomainGetState, /* 0.9.2 */