qemu: Remove redundant parameter in virQEMUCapsFillDomainCaps

virttype is already included in domCaps, no need to pass it separately.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2016-06-27 15:12:34 +02:00
parent 324d2cdda4
commit 5343dd4a31
4 changed files with 5 additions and 8 deletions

View File

@ -4337,8 +4337,7 @@ int
virQEMUCapsFillDomainCaps(virDomainCapsPtr domCaps,
virQEMUCapsPtr qemuCaps,
virFirmwarePtr *firmwares,
size_t nfirmwares,
virDomainVirtType virttype)
size_t nfirmwares)
{
virDomainCapsOSPtr os = &domCaps->os;
virDomainCapsDeviceDiskPtr disk = &domCaps->disk;
@ -4348,7 +4347,7 @@ virQEMUCapsFillDomainCaps(virDomainCapsPtr domCaps,
domCaps->maxvcpus = virQEMUCapsGetMachineMaxCpus(qemuCaps,
domCaps->machine);
if (virttype == VIR_DOMAIN_VIRT_KVM) {
if (domCaps->virttype == VIR_DOMAIN_VIRT_KVM) {
int hostmaxvcpus = virHostCPUGetKVMMaxVCPUs();
if (hostmaxvcpus >= 0)
domCaps->maxvcpus = MIN(domCaps->maxvcpus, hostmaxvcpus);

View File

@ -492,7 +492,6 @@ int virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
int virQEMUCapsFillDomainCaps(virDomainCapsPtr domCaps,
virQEMUCapsPtr qemuCaps,
virFirmwarePtr *firmwares,
size_t nfirmwares,
virDomainVirtType virttype);
size_t nfirmwares);
#endif /* __QEMU_CAPABILITIES_H__*/

View File

@ -18411,7 +18411,7 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
goto cleanup;
if (virQEMUCapsFillDomainCaps(domCaps, qemuCaps,
cfg->firmwares, cfg->nfirmwares, virttype) < 0)
cfg->firmwares, cfg->nfirmwares) < 0)
goto cleanup;
ret = virDomainCapsFormat(domCaps);

View File

@ -129,8 +129,7 @@ fillQemuCaps(virDomainCapsPtr domCaps,
if (virQEMUCapsFillDomainCaps(domCaps, qemuCaps,
cfg->firmwares,
cfg->nfirmwares,
VIR_DOMAIN_VIRT_QEMU) < 0)
cfg->nfirmwares) < 0)
goto cleanup;
/* The function above tries to query host's KVM & VFIO capabilities by