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

Eric Blake eblake at redhat.com
Fri Jan 28 22:22:51 UTC 2011


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 at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110128/01549fb7/attachment-0001.sig>


More information about the libvir-list mailing list