[libvirt] PATCH: 12/14: Convert XM driver XML formatter to generic API
Daniel Veillard
veillard at redhat.com
Thu Jul 24 20:16:38 UTC 2008
On Thu, Jul 24, 2008 at 06:03:24PM +0100, Daniel P. Berrange wrote:
> On Thu, Jul 24, 2008 at 11:53:48AM -0400, Daniel Veillard wrote:
> > On Tue, Jul 08, 2008 at 05:41:01PM +0100, Daniel P. Berrange wrote:
> > > This replaces the code which converts from virConfPtr objects
> > > into XML, with code which converts from virConfPtr objects
> > > straight into virDomainDefPtr objects. A few more XML changes
> > > are needed in the test suite to take account of better XML
> > > generation this produces
> > [...]
> > > -/**
> > > - * sound_string_to_xml:
> > > - * @soundstr : soundhw string for the form m1,m2,m3 ...
> >
> > okay the function which wasn't doing the check and got out of the way
> >
> >
> > > -xenXMError(virConnectPtr conn, virErrorNumber error, const char *info)
> > > +xenXMError(virConnectPtr conn, int code, const char *fmt, ...)
> >
> > cool improvement
> >
> >
> > I didn't spot anything suspicious in the code. I was just expecting it to
> > be a bit smaller, but the allocation of the virConfPtr and sub objects takes
> > as much code as outputting the equivalent XML buf, to my surprise.
>
> Yes, it surprised me too. On the plus side though I think the new
> code is easier to read/follow, even if it is the same length
it's also deeper in the analysis of the strings passed back and forth,
which explains the inflation, it's more thorough.
> >
> >
> > > - <type arch='i686' machine='xenfv'>hvm</type>
> > > + <type>hvm</type>
> >
> > Hum the previous patch was changing things the way around ...
>
> Yes that's odd - I'll investigate this.
>
> >
> > > <devices>
> > > - <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
> > > <disk type='block' device='disk'>
> >
> > and removing the extra emulator
>
> Also unexpected.
Ah, i found something in the end :-)
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
More information about the libvir-list
mailing list