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

[libvirt] [PATCH 48/66] vbox: Rewrite vboxDomainDetachDeviceFlags



---
 src/vbox/vbox_common.c        |   14 ++++++++++++++
 src/vbox/vbox_tmpl.c          |   15 ---------------
 src/vbox/vbox_uniformed_api.h |    2 ++
 3 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index f6ea357..4e0b990 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -4286,3 +4286,17 @@ int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
     virDomainDeviceDefFree(dev);
     return ret;
 }
+
+int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
+                                unsigned int flags)
+{
+    virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
+
+    if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
+        virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+                       _("cannot modify the persistent configuration of a domain"));
+        return -1;
+    }
+
+    return vboxDomainDetachDevice(dom, xml);
+}
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 65f2d34..eeebd6f 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1451,21 +1451,6 @@ _vboxAttachDrivesOld(virDomainDefPtr def ATTRIBUTE_UNUSED,
 #endif /* VBOX_API_VERSION >= 4000000 */
 
 static int
-vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
-                            unsigned int flags)
-{
-    virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
-
-    if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
-        virReportError(VIR_ERR_OPERATION_INVALID, "%s",
-                       _("cannot modify the persistent configuration of a domain"));
-        return -1;
-    }
-
-    return vboxDomainDetachDevice(dom, xml);
-}
-
-static int
 vboxDomainSnapshotGetAll(virDomainPtr dom,
                          IMachine *machine,
                          ISnapshot ***snapshots)
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index 357590c..48c2973 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -533,6 +533,8 @@ int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
 int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
                                 unsigned int flags);
 int vboxDomainDetachDevice(virDomainPtr dom, const char *xml);
+int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
+                                unsigned int flags);
 
 /* Version specified functions for installing uniformed API */
 void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
-- 
1.7.9.5


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