Re: [PATCH] make virDomainGetMaxVcpus work on inactive domains

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

 



Claudio Bley wrote:
> Signed-off-by: Claudio Bley <cbley@xxxxxxxxxx>
> ---
> OK, how about this patch?
>
> While at it, should I convert the VIR_DOMAIN_VCPU_* instances to
> VIR_DOMAIN_AFFECT_* instances for consistency?
>
>  src/esx/esx_driver.c       |    2 +-
>  src/openvz/openvz_driver.c |    2 +-
>  src/phyp/phyp_driver.c     |    2 +-
>  src/qemu/qemu_driver.c     |    2 +-
>  src/test/test_driver.c     |    2 +-
>  src/vbox/vbox_tmpl.c       |    2 +-
>  src/xen/xen_driver.c       |    2 +-
>  src/xenapi/xenapi_driver.c |    2 +-
>   

I think the libxl driver should be included here too.

Regards,
Jim

>  8 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index 886d984..6e05d78 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> @@ -2646,7 +2646,7 @@ esxDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
>  static int
>  esxDomainGetMaxVcpus(virDomainPtr domain)
>  {
> -    return esxDomainGetVcpusFlags(domain, (VIR_DOMAIN_AFFECT_LIVE |
> +    return esxDomainGetVcpusFlags(domain, (VIR_DOMAIN_AFFECT_CURRENT |
>                                             VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
> diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
> index b27ac4c..e1f9738 100644
> --- a/src/openvz/openvz_driver.c
> +++ b/src/openvz/openvz_driver.c
> @@ -1318,7 +1318,7 @@ openvzDomainGetVcpusFlags(virDomainPtr dom ATTRIBUTE_UNUSED,
>  
>  static int openvzDomainGetMaxVcpus(virDomainPtr dom)
>  {
> -    return openvzDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_LIVE |
> +    return openvzDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_CURRENT |
>                                             VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
> diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
> index 9adb6b0..4510b82 100644
> --- a/src/phyp/phyp_driver.c
> +++ b/src/phyp/phyp_driver.c
> @@ -1372,7 +1372,7 @@ phypDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
>  static int
>  phypDomainGetMaxVcpus(virDomainPtr dom)
>  {
> -    return phypDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_LIVE |
> +    return phypDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_CURRENT |
>                                           VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 6ea837e..2068ace 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -4986,7 +4986,7 @@ cleanup:
>  static int
>  qemuDomainGetMaxVcpus(virDomainPtr dom)
>  {
> -    return qemuDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_LIVE |
> +    return qemuDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_CURRENT |
>                                           VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
> diff --git a/src/test/test_driver.c b/src/test/test_driver.c
> index b724f82..a320241 100644
> --- a/src/test/test_driver.c
> +++ b/src/test/test_driver.c
> @@ -2620,7 +2620,7 @@ cleanup:
>  static int
>  testDomainGetMaxVcpus(virDomainPtr domain)
>  {
> -    return testDomainGetVcpusFlags(domain, (VIR_DOMAIN_AFFECT_LIVE |
> +    return testDomainGetVcpusFlags(domain, (VIR_DOMAIN_AFFECT_CURRENT |
>                                              VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
> diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
> index 382d7b4..fbae940 100644
> --- a/src/vbox/vbox_tmpl.c
> +++ b/src/vbox/vbox_tmpl.c
> @@ -2208,7 +2208,7 @@ vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
>  static int
>  vboxDomainGetMaxVcpus(virDomainPtr dom)
>  {
> -    return vboxDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_LIVE |
> +    return vboxDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_CURRENT |
>                                           VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
> diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
> index 7506e8c..38bbce0 100644
> --- a/src/xen/xen_driver.c
> +++ b/src/xen/xen_driver.c
> @@ -1539,7 +1539,7 @@ cleanup:
>  static int
>  xenUnifiedDomainGetMaxVcpus(virDomainPtr dom)
>  {
> -    return xenUnifiedDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_LIVE |
> +    return xenUnifiedDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_CURRENT |
>                                                 VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
> diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
> index a547306..688d162 100644
> --- a/src/xenapi/xenapi_driver.c
> +++ b/src/xenapi/xenapi_driver.c
> @@ -1347,7 +1347,7 @@ xenapiDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
>  static int
>  xenapiDomainGetMaxVcpus(virDomainPtr dom)
>  {
> -    return xenapiDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_LIVE |
> +    return xenapiDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_CURRENT |
>                                             VIR_DOMAIN_VCPU_MAXIMUM));
>  }
>  
>   

--
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]