]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virsh: improve memory unit parsing
authorEric Blake <eblake@redhat.com>
Tue, 6 Mar 2012 00:06:57 +0000 (17:06 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 8 Mar 2012 01:24:45 +0000 (18:24 -0700)
commit210ed0e871c628cc696bcf7cc0531b8b8dfcd533
tree271b1d5d97420926976f66949a9e91a0d039bbda
parentab95da40587665063b0c8eaeae22c91003f0da1c
virsh: improve memory unit parsing

The last vestige of the inaccurate 'kilobytes' when we meant 1024 is
now gone.  And virsh is now useful for setting memory in units other
than KiB.

* tools/virsh.c (cmdSetmem, cmdSetmaxmem): Use new helper routine,
allow passing bogus arguments on to hypervisor to test driver
sanity checking, and fix leak on parse error.
(vshMemtuneGetSize): New helper.
(cmdMemtune): Use it.
* tools/virsh.pod (setmem, setmaxmem, memtune): Document this.
tools/virsh.c
tools/virsh.pod