From 73838d331f7fe3ae395f9bc53015a12e993b6c48 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 21 Jul 2011 10:01:44 +0200 Subject: [PATCH] destroy: Implement internal API for vmware driver --- src/vmware/vmware_driver.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 71f3d2284c..5c63239c45 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -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 */