[PATCH 45/66] vbox: Rewrite vboxDomainAttachDeviceFlags

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

 



---
 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 84d82d7..f22cb5b 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -4155,3 +4155,17 @@ int vboxDomainAttachDevice(virDomainPtr dom, const char *xml)
 {
     return vboxDomainAttachDeviceImpl(dom, xml, 0);
 }
+
+int vboxDomainAttachDeviceFlags(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 vboxDomainAttachDeviceImpl(dom, xml, 0);
+}
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index b80810d..5078f27 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1649,21 +1649,6 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
     return ret;
 }
 
-static int
-vboxDomainAttachDeviceFlags(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 vboxDomainAttachDeviceImpl(dom, xml, 0);
-}
-
 static int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
                                        unsigned int flags)
 {
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index 1f82616..69090f3 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -525,6 +525,8 @@ int vboxConnectListDefinedDomains(virConnectPtr conn,
                                   char ** const names, int maxnames);
 int vboxConnectNumOfDefinedDomains(virConnectPtr conn);
 int vboxDomainAttachDevice(virDomainPtr dom, const char *xml);
+int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
+                                unsigned int flags);
 
 /* Version specified functions for installing uniformed API */
 void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
-- 
1.7.9.5

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