
On 02/22/2012 09:59 PM, Eric Blake wrote:
Output is still in kibibytes, but input can now be in different scales for ease of typing.
* src/conf/domain_conf.c (virDomainParseMemory): New helper. (virDomainDefParseXML): Use it when parsing. * docs/schemas/domaincommon.rng: Expand XML. * docs/formatdomain.html.in (elementsMemoryAllocation): Document scaling. --- docs/formatdomain.html.in | 39 ++++++++++--- docs/schemas/domaincommon.rng | 4 +- src/conf/domain_conf.c | 129 ++++++++++++++++++++++++++++++++++------ 3 files changed, 142 insertions(+), 30 deletions(-)
self-NACK to v1 - I forgot to add a unit test that exercises the new unit parsing, and...
+ tebibytes (1,099,511,627,776). However, the value will be + rounded up to the nearest kibibyte by libvirt, and may be + further rounded to the granularity supported by the + hypervisor. As a sanity check, values less than 4000KiB are + not permitted.
This statement is not true (I originally tried to make the C code match the RNG, but it caused too many testsuite failures, so I rebased and inserted 2/3 to fix the RNG instead, but forgot to touch this up again). I'll fix that in v2, along with a rename to unit='KiB' instead of units. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org