Re: [PATCH 07/34] conf: Replace writes to def->maxvcpus with accessor

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

 




On 11/20/2015 10:21 AM, Peter Krempa wrote:
> To support further refactors replace all write access to def->maxvcpus
> with a accessor function.
> ---
>  src/conf/domain_conf.c     | 18 ++++++++++++++++--
>  src/conf/domain_conf.h     |  2 ++
>  src/hyperv/hyperv_driver.c |  5 ++++-
>  src/libvirt_private.syms   |  1 +
>  src/libxl/libxl_driver.c   |  8 ++++++--
>  src/lxc/lxc_native.c       |  4 +++-
>  src/openvz/openvz_conf.c   |  4 +++-
>  src/openvz/openvz_driver.c |  5 ++++-
>  src/phyp/phyp_driver.c     |  4 +++-
>  src/qemu/qemu_command.c    |  9 +++++++--
>  src/qemu/qemu_driver.c     |  4 +++-
>  src/test/test_driver.c     |  4 +++-
>  src/vbox/vbox_common.c     | 11 +++++++++--
>  src/vmx/vmx.c              |  5 ++++-
>  src/vz/vz_sdk.c            |  4 +++-
>  src/xen/xm_internal.c      |  4 +++-
>  src/xenapi/xenapi_driver.c |  4 +++-
>  src/xenconfig/xen_common.c |  4 +++-
>  src/xenconfig/xen_sxpr.c   |  3 ++-
>  19 files changed, 82 insertions(+), 21 deletions(-)
> 

Now that I'm much further along...

> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index a744412..e0fc09c 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -1424,6 +1424,16 @@ void virDomainLeaseDefFree(virDomainLeaseDefPtr def)
>  }
> 
> 
> +int
> +virDomainDefSetVCpusMax(virDomainDefPtr def,
> +                        unsigned int vcpus)

should this change to "maxvcpus"?

Not all that important, but it may make for easier reading later on when
def->maxvcpus intersperses with def->vcpus and there's a vcpus variable
that relates to max and not current.

John
> +{
> +    def->maxvcpus = vcpus;
> +
> +    return 0;
> +}
> +
> +

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