On Tue, Sep 27, 2011 at 06:42:22AM -0600, Eric Blake wrote:
On 09/27/2011 01:20 AM, Daniel Veillard wrote:
>>@@ -10477,13 +10477,16 @@ virDomainDefFormatInternal(virDomainDefPtr def,
>> if (def->id == -1)
>> flags |= VIR_DOMAIN_XML_INACTIVE;
>>
>>- virBufferAsprintf(buf, "<domain type='%s'", type);
>>+ virBufferAsprintf(buf, "%*s<domain type='%s'", indent,
"", type);
>
> Hum I have never seen that formatting command used before. I would
>rather add a virBufferIndentAsprintf() instead to be honnest and avoid
>this, that's clearer from my POV.
I had to add virBufferIndentEscapeString, since that could only take
one %s in the format, but left virBufferAsprintf up to the user to
exploit full formatting power. But now that you mention it, yes,
virBufferIndentAsprintf would make things easier to read. I'll
incorporate that into my v2.
Okay, thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/