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

[libvirt] [PATCH 38/66] vbox: Rewrite vboxDomainGetMaxVcpus



---
 src/vbox/vbox_common.c        |    6 ++++++
 src/vbox/vbox_tmpl.c          |    7 -------
 src/vbox/vbox_uniformed_api.h |    1 +
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 120ad6c..24d2ddb 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -2854,3 +2854,9 @@ int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
 
     return ret;
 }
+
+int vboxDomainGetMaxVcpus(virDomainPtr dom)
+{
+    return vboxDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_LIVE |
+                                         VIR_DOMAIN_VCPU_MAXIMUM));
+}
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 50e4653..8abb9a7 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -954,13 +954,6 @@ static virDomainState _vboxConvertState(PRUint32 state)
     }
 }
 
-static int
-vboxDomainGetMaxVcpus(virDomainPtr dom)
-{
-    return vboxDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_LIVE |
-                                         VIR_DOMAIN_VCPU_MAXIMUM));
-}
-
 static void vboxHostDeviceGetXMLDesc(vboxGlobalData *data, virDomainDefPtr def, IMachine *machine)
 {
 #if VBOX_API_VERSION < 4003000
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index 5bab8fa..f67c109 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -442,6 +442,7 @@ int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
                             unsigned int flags);
 int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus);
 int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags);
+int vboxDomainGetMaxVcpus(virDomainPtr dom);
 
 /* 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]