[PATCH 10/13] destroy: Implement internal API for vbox driver

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

 



---
 src/vbox/vbox_tmpl.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 53bac79..19fdaef 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1689,7 +1689,10 @@ cleanup:
     return ret;
 }
 
-static int vboxDomainDestroy(virDomainPtr dom) {
+static int
+vboxDomainDestroyWithFlags(virDomainPtr dom,
+                           unsigned int flags)
+{
     VBOX_OBJECT_CHECK(dom->conn, int, -1);
     IMachine *machine    = NULL;
     vboxIID iid = VBOX_IID_INITIALIZER;
@@ -1698,6 +1701,8 @@ static int vboxDomainDestroy(virDomainPtr dom) {
     PRBool isAccessible  = PR_FALSE;
     nsresult rc;
 
+    virCheckFlags(0, -1);
+
     vboxIIDFromUUID(&iid, dom->uuid);
     rc = VBOX_OBJECT_GET_MACHINE(iid.value, &machine);
     if (NS_FAILED(rc)) {
@@ -1746,6 +1751,12 @@ cleanup:
     return ret;
 }
 
+static int
+vboxDomainDestroy(virDomainPtr dom)
+{
+    return vboxDomainDestroyWithFlags(dom, 0);
+}
+
 static char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
     /* Returning "hvm" always as suggested on list, cause
      * this functions seems to be badly named and it
@@ -8774,6 +8785,7 @@ virDriver NAME(Driver) = {
     .domainShutdown = vboxDomainShutdown, /* 0.6.3 */
     .domainReboot = vboxDomainReboot, /* 0.6.3 */
     .domainDestroy = vboxDomainDestroy, /* 0.6.3 */
+    .domainDestroyWithFlags = vboxDomainDestroyWithFlags, /* 0.9.4 */
     .domainGetOSType = vboxDomainGetOSType, /* 0.6.3 */
     .domainSetMemory = vboxDomainSetMemory, /* 0.6.3 */
     .domainGetInfo = vboxDomainGetInfo, /* 0.6.3 */
-- 
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]