]> xenbits.xensource.com Git - libvirt.git/commit
snapshot: indent domain xml when nesting
authorEric Blake <eblake@redhat.com>
Sat, 17 Sep 2011 12:57:30 +0000 (06:57 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 20 Oct 2011 22:02:16 +0000 (16:02 -0600)
commit9cba3927684f7fe46872fae74843087139a4cca2
tree3baa6b782532bc8066084bbe4d239af1a7111282
parentfd9c052e6dcb5ae20d58f2f131a653ca4f5addbd
snapshot: indent domain xml when nesting

<domainsnapshot> is the first public instance of <domain> being
used as a sub-element, although we have two other private uses
(runtime state, and migration cookie).  Although indentation has
no effect on XML parsing, using it makes the output more consistent.

This uses virBuffer auto-indentation to obtain the effect, for all
but the portions of <domain> that are not generated a line at a
time into the same virBuffer.  Further patches will clean up the
remaining problems.

* src/conf/domain_conf.h (virDomainDefFormatInternal): New prototype.
* src/conf/domain_conf.c (virDomainDefFormatInternal): Export.
(virDomainObjFormat, virDomainSnapshotDefFormat): Update callers.
* src/libvirt_private.syms (domain_conf.h): Add new export.
* src/qemu/qemu_migration.c (qemuMigrationCookieXMLFormat): Use
new function.
(qemuMigrationCookieXMLFormatStr): Update caller.
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_migration.c