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

Re: [libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains



On 02/19/2014 05:03 AM, Claudio Bley wrote:
> 
> Signed-off-by: Claudio Bley <cbley av-test de>
> ---
> OK, how about this patch?
> 
> While at it, should I convert the VIR_DOMAIN_VCPU_* instances to
> VIR_DOMAIN_AFFECT_* instances for consistency?

Yes, making that conversion as a separate patch for consistency would be
nice.


>  {
> -    return esxDomainGetVcpusFlags(domain, (VIR_DOMAIN_AFFECT_LIVE |
> +    return esxDomainGetVcpusFlags(domain, (VIR_DOMAIN_AFFECT_CURRENT |
>                                             VIR_DOMAIN_VCPU_MAXIMUM));

VIR_DOMAIN_AFFECT_CURRENT == 0, so you could simplify this to just
passing VIR_DOMAIN_VCPU_MAXIMUM instead of a bitwise-or.  On the other
hand, making the _CURRENT explicit may be a bit more self-documenting,
so I'm not going to insist.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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