Re: [PATCH] make virDomainGetMaxVcpus work on inactive domains

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

 



On 02/19/2014 05:03 AM, 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?

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

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