[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



---
 src/qemu/qemu_driver.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e13b63b..ddadb08 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1556,13 +1556,18 @@ cleanup:
 }
 
 
-static int qemudDomainDestroy(virDomainPtr dom) {
+static int
+qemudDomainDestroyWithFlags(virDomainPtr dom,
+                            unsigned int flags)
+{
     struct qemud_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
     virDomainEventPtr event = NULL;
     qemuDomainObjPrivatePtr priv;
 
+    virCheckFlags(0, -1);
+
     qemuDriverLock(driver);
     vm  = virDomainFindByUUID(&driver->domains, dom->uuid);
     if (!vm) {
@@ -1620,6 +1625,11 @@ cleanup:
     return ret;
 }
 
+static int
+qemudDomainDestroy(virDomainPtr dom)
+{
+    return qemudDomainDestroyWithFlags(dom, 0);
+}
 
 static char *qemudDomainGetOSType(virDomainPtr dom) {
     struct qemud_driver *driver = dom->conn->privateData;
@@ -8621,6 +8631,7 @@ static virDriver qemuDriver = {
     .domainShutdown = qemuDomainShutdown, /* 0.2.0 */
     .domainReboot = qemuDomainReboot, /* 0.9.3 */
     .domainDestroy = qemudDomainDestroy, /* 0.2.0 */
+    .domainDestroyWithFlags = qemudDomainDestroyWithFlags, /* 0.9.4 */
     .domainGetOSType = qemudDomainGetOSType, /* 0.2.2 */
     .domainGetMaxMemory = qemudDomainGetMaxMemory, /* 0.4.2 */
     .domainSetMaxMemory = qemudDomainSetMaxMemory, /* 0.4.2 */
-- 
1.7.5.rc3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]