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

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



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

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index d24a5e3..92470d8 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -577,12 +577,16 @@ cleanup:
   return ret;
 }
 
-static int openvzDomainShutdown(virDomainPtr dom) {
+static int
+openvzDomainShutdownWithFlags(virDomainPtr dom,
+                              unsigned int flags) {
     struct openvz_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
     const char *prog[] = {VZCTL, "--quiet", "stop", PROGRAM_SENTINAL, NULL};
     int ret = -1;
 
+    virCheckFlags(0, -1);
+
     openvzDriverLock(driver);
     vm = virDomainFindByUUID(&driver->domains, dom->uuid);
     openvzDriverUnlock(driver);
@@ -614,6 +618,12 @@ cleanup:
     return ret;
 }
 
+static int
+openvzDomainShutdown(virDomainPtr dom)
+{
+    return openvzDomainShutdownWithFlags(dom, 0);
+}
+
 static int openvzDomainReboot(virDomainPtr dom,
                               unsigned int flags)
 {
@@ -1621,6 +1631,7 @@ static virDriver openvzDriver = {
     .domainShutdown = openvzDomainShutdown, /* 0.3.1 */
     .domainReboot = openvzDomainReboot, /* 0.3.1 */
     .domainDestroy = openvzDomainShutdown, /* 0.3.1 */
+    .domainDestroyWithFlags = openvzDomainShutdownWithFlags, /* 0.9.4 */
     .domainGetOSType = openvzGetOSType, /* 0.3.1 */
     .domainGetInfo = openvzDomainGetInfo, /* 0.3.1 */
     .domainGetState = openvzDomainGetState, /* 0.9.2 */
-- 
1.7.5.rc3


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