Re: [libvirt] [PATCHv2 1/6] virsh-domain: Refactor cmdVcpucount and fix output on inactive domains

2013-04-19 Thread Peter Krempa
On 04/19/13 01:27, Eric Blake wrote: On 04/16/2013 08:00 AM, Peter Krempa wrote: This patch factors out the vCPU count retrieval including fallback means into vshCPUCountCollect() and removes the duplicated code to retrieve individual counts. +#define PRINT_COUNT(VAR, MAX, STATE) if (VAR > 0

Re: [libvirt] [PATCHv2 1/6] virsh-domain: Refactor cmdVcpucount and fix output on inactive domains

2013-04-18 Thread Eric Blake
On 04/16/2013 08:00 AM, Peter Krempa wrote: > This patch factors out the vCPU count retrieval including fallback means > into vshCPUCountCollect() and removes the duplicated code to retrieve > individual counts. > > +#define PRINT_COUNT(VAR, MAX, STATE) if (VAR > 0) \ > +vshPrint(ctl, "%-12s

[libvirt] [PATCHv2 1/6] virsh-domain: Refactor cmdVcpucount and fix output on inactive domains

2013-04-16 Thread Peter Krempa
This patch factors out the vCPU count retrieval including fallback means into vshCPUCountCollect() and removes the duplicated code to retrieve individual counts. The --current flag (this flag is assumed by default) now works also with --maximum or --active without the need to explicitly specify th