Re: [PATCH] virsh: host: Use bitmap size in bytes rather than bit count

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

 



On Mon, Apr 25, 2016 at 10:43:41AM +0200, Peter Krempa wrote:
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1329819
> ---
>  tools/virsh-host.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/virsh-host.c b/tools/virsh-host.c
> index 80ac4bd..c9b2646 100644
> --- a/tools/virsh-host.c
> +++ b/tools/virsh-host.c
> @@ -699,7 +699,7 @@ cmdNodeCpuMap(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
> 
>      vshPrint(ctl, "%-15s ", _("CPU map:"));
>      if (pretty) {
> -        char *str = virBitmapDataToString(cpumap, cpunum);
> +        char *str = virBitmapDataToString(cpumap, VIR_DIV_UP(cpunum, 8));
> 

Using VIR_CPU_MAPLEN(cpunum) would be more obvious and consistent.

ACK with that change.

Jan

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