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

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

 



---
 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..d9e76f5 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
+openvzDomainShutdownFlags(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 openvzDomainShutdownFlags(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 */
+    .domainDestroyFlags = openvzDomainShutdownFlags, /* 0.9.4 */
     .domainGetOSType = openvzGetOSType, /* 0.3.1 */
     .domainGetInfo = openvzDomainGetInfo, /* 0.3.1 */
     .domainGetState = openvzDomainGetState, /* 0.9.2 */
-- 
1.7.5.rc3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]