From 35cb445a512371a041f55f5c279619cd9fe886bd Mon Sep 17 00:00:00 2001 From: Taowei Date: Mon, 11 Aug 2014 18:06:39 +0800 Subject: [PATCH] vbox: Rewrite vboxDomainSetVcpus --- src/vbox/vbox_common.c | 5 +++++ src/vbox/vbox_tmpl.c | 6 ------ src/vbox/vbox_uniformed_api.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 7ccfba0495..e3c89a485f 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -2821,3 +2821,8 @@ int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus, vboxIIDUnalloc(&iid); return ret; } + +int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) +{ + return vboxDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_AFFECT_LIVE); +} diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 7766d906b7..8a778cca71 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -955,12 +955,6 @@ static virDomainState _vboxConvertState(PRUint32 state) } } -static int -vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) -{ - return vboxDomainSetVcpusFlags(dom, nvcpus, VIR_DOMAIN_AFFECT_LIVE); -} - static int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags) { diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index 84a8a37506..cb0450151b 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -440,7 +440,7 @@ int vboxDomainGetState(virDomainPtr dom, int *state, int *reason, unsigned int flags); int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus, unsigned int flags); - +int vboxDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus); /* Version specified functions for installing uniformed API */ void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);