mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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:
parent
324d2cdda4
commit
5343dd4a31
@ -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);
|
||||
|
@ -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__*/
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user