[libvirt] PATCH: 12/14: Convert XM driver XML formatter to generic API

Daniel P. Berrange berrange at redhat.com
Thu Jul 24 17:03:24 UTC 2008


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

> 
> 
> > -    <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.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list