---
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