• E
    snapshot: indent domain xml when nesting · 9cba3927
    Eric Blake 提交于
    <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.
    9cba3927
domain_conf.c 408.5 KB