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

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


---
 src/xenapi/xenapi_driver.c |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 97da1d1..75a11e3 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -839,13 +839,19 @@ xenapiDomainReboot (virDomainPtr dom, unsigned int flags)
 }
 
 /*
- * xenapiDomaindestroy
+ * xenapiDomainDestroyWithFlags:
+ * @dom: domain object
+ * @flags: an OR'ed set of virDomainDestroyFlags
+ *
+ * Calling this function with no flags set (equal zero)
+ * is equivalent calling xenapiDomainDestroy.
  *
  * A VM is hard shutdown
  * Returns 0 on success or -1 in case of error
  */
 static int
-xenapiDomainDestroy (virDomainPtr dom)
+xenapiDomainDestroyWithFlags(virDomainPtr dom,
+                             unsigned int flags)
 {
     /* vm.hard_shutdown */
     xen_vm vm;
@@ -874,6 +880,17 @@ xenapiDomainDestroy (virDomainPtr dom)
 }
 
 /*
+ * xenapiDomainDestroy:
+ * @dom: domain object
+ *
+ * See xenapiDomainDestroyWithFlags
+ */
+static int
+xenapiDomainDestroy(virDomainPtr dom)
+{
+    return xenapiDomainDestroyWithFlags(dom, 0);
+}
+/*
  * xenapiDomainGetOSType
  *
  *
@@ -1883,6 +1900,7 @@ static virDriver xenapiDriver = {
     .domainShutdown = xenapiDomainShutdown, /* 0.8.0 */
     .domainReboot = xenapiDomainReboot, /* 0.8.0 */
     .domainDestroy = xenapiDomainDestroy, /* 0.8.0 */
+    .domainDestroyWithFlags = xenapiDomainDestroyWithFlags, /* 0.9.4 */
     .domainGetOSType = xenapiDomainGetOSType, /* 0.8.0 */
     .domainGetMaxMemory = xenapiDomainGetMaxMemory, /* 0.8.0 */
     .domainSetMaxMemory = xenapiDomainSetMaxMemory, /* 0.8.0 */
-- 
1.7.5.rc3




More information about the libvir-list mailing list