[libvirt] [PATCH 1/3] xml: output memory unit for clarity

Christophe Fergeau cfergeau at redhat.com
Thu Feb 23 09:55:49 UTC 2012


On Thu, Feb 23, 2012 at 08:56:50AM +0100, Matthias Bolte wrote:
> 2012/2/23 Eric Blake <eblake at redhat.com>:
> > Make it obvious to 'dumpxml' readers what unit we are using,
> > since our default of KiB (1024) differs from qemu's default of MiB.
> 
> > diff --git a/tests/xml2vmxdata/xml2vmx-svga.xml b/tests/xml2vmxdata/xml2vmx-svga.xml
> > index b7db4c8..9f93ef9 100644
> > --- a/tests/xml2vmxdata/xml2vmx-svga.xml
> > +++ b/tests/xml2vmxdata/xml2vmx-svga.xml
> > @@ -1,7 +1,7 @@
> >  <domain type='vmware'>
> >   <name>minimal</name>
> >   <uuid>564d9bef-acd9-b4e0-c8f0-aea8b9103515</uuid>
> > -  <memory>4096</memory>
> > +  <memory units='KiB'>4096</memory>
> >   <os>
> >     <type>hvm</type>
> >   </os>
> 
> Good idea, but why did you decide to name the attribute "units"
> (plural) instead of "unit"? As a value can only have one unit the
> attribute name "units" is misleading.

Agreed, especially since <volume><allocation> already uses "unit"

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120223/21e8ae1d/attachment-0001.sig>


More information about the libvir-list mailing list