vbox: Rewrite vboxDomainGetMaxVcpus

This commit is contained in:
Taowei 2014-08-11 18:06:41 +08:00 committed by Michal Privoznik
parent e9f17c5330
commit 696ad27977
3 changed files with 7 additions and 7 deletions

View File

@ -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));
}

View File

@ -955,13 +955,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

View File

@ -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);