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

Re: [libvirt] [PATCH v2] virsh: added --all flag to freecell command



On 01/28/2011 11:21 AM, Michal Privoznik wrote:
> This will iterate over all NUMA nodes, showing
> free memory for each and sum at the end.
> Existing default behavior is not changed.

> +    if (all_given && cell_given) {
> +        vshError(ctl, "%s", _("--cellno and --all are mutually exclusive. "
> +                              "Please choose only one."));
> +        goto cleanup;

I see you fixed the 80 columns, but kept the longer (polite) message :)

> +        memory = 0;
> +        for (cell = 0; cell < info.nodes; cell++) {
> +            vshPrint(ctl, "%5d: %10llu kB\n", cell, (nodes[cell]/1024));

Hmm - it's a race - does this go in before or after VIR_DIV_UP?


> +            memory += nodes[cell];
> +        }
> +
> +        vshPrintExtra(ctl, "--------------------\n");
> +        vshPrintExtra(ctl, "%5s: %10llu kB\n",_("Total"), memory/1024);

s/,_/, _/

ACK with the nit fixed, so I pushed this.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
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]