[libvirt] [PATCH 04/13] destroy: Implement internal API for ESX driver

Michal Privoznik mprivozn at redhat.com
Thu Jul 21 09:28:31 UTC 2011


---
 src/esx/esx_driver.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 5ed6a38..f98c579 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -1937,7 +1937,8 @@ esxDomainReboot(virDomainPtr domain, unsigned int flags)
 
 
 static int
-esxDomainDestroy(virDomainPtr domain)
+esxDomainDestroyWithFlags(virDomainPtr domain,
+                          unsigned int flags)
 {
     int result = -1;
     esxPrivate *priv = domain->conn->privateData;
@@ -1949,6 +1950,8 @@ esxDomainDestroy(virDomainPtr domain)
     esxVI_TaskInfoState taskInfoState;
     char *taskInfoErrorMessage = NULL;
 
+    virCheckFlags(0, -1);
+
     if (priv->vCenter != NULL) {
         ctx = priv->vCenter;
     } else {
@@ -2001,6 +2004,12 @@ esxDomainDestroy(virDomainPtr domain)
 }
 
 
+static int
+esxDomainDestroy(virDomainPtr dom)
+{
+    return esxDomainDestroyWithFlags(dom, 0);
+}
+
 
 static char *
 esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
@@ -4734,6 +4743,7 @@ static virDriver esxDriver = {
     .domainShutdown = esxDomainShutdown, /* 0.7.0 */
     .domainReboot = esxDomainReboot, /* 0.7.0 */
     .domainDestroy = esxDomainDestroy, /* 0.7.0 */
+    .domainDestroyWithFlags = esxDomainDestroyWithFlags, /* 0.9.4 */
     .domainGetOSType = esxDomainGetOSType, /* 0.7.0 */
     .domainGetMaxMemory = esxDomainGetMaxMemory, /* 0.7.0 */
     .domainSetMaxMemory = esxDomainSetMaxMemory, /* 0.7.0 */
-- 
1.7.5.rc3




More information about the libvir-list mailing list