[libvirt] [PATCH 01/14] snapshot: indent domain xml when nesting, round 1

Daniel P. Berrange berrange at redhat.com
Tue Sep 27 09:03:55 UTC 2011

On Thu, Sep 22, 2011 at 02:34:55PM -0600, Eric Blake wrote:
> Future patches can take advantage of this to generate nicer
> XML output with parameterizable indentation.

Hmm, is there any way we can work with virBuffer so that we don't
need to pass an indent level to every single API call ?

eg, can we have something which lets us do

   virBufferSetIndent(buf, "     ");

and then it will automagically prepend that indent every time
a API call is made following a newline. If we could do this,
then pretty much all of your patches would disappear

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

More information about the libvir-list mailing list