Re: [PATCH 1/2] qemu: Remove redundant parameter in virQEMUCapsFillDomainCaps

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

 



On Mon, 2016-06-27 at 15:50 +0200, Jiri Denemark wrote:
> virttype is already included in domCaps, no need to pass it separately.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_capabilities.c | 5 ++---
>  src/qemu/qemu_capabilities.h | 3 +--
>  src/qemu/qemu_driver.c       | 2 +-
>  tests/domaincapstest.c       | 3 +--
>  4 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 28d5321..2c0b29d 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -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);
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index 9d891c8..affb639 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -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__*/
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 61d184b..749f8a1 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -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);
> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
> index 01ebfcc..ae31146 100644
> --- a/tests/domaincapstest.c
> +++ b/tests/domaincapstest.c
> @@ -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

This should be patch 2/2 in the series.

ACK with that changed.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]