[libvirt] [PATCH] xml: shell-escape domain name in comment

2012-10-24 Thread Ján Tomko
Add virBufferEscapeShellXMLComment function that both quotes a string so shell deosn't interpert any special characters in it and makes sure that there's no -- in it, to avoid clashes with XML comments. virXMLEmitWarning is changed to use virBuffer and use the above function on the domain name.

Re: [libvirt] [PATCH] xml: shell-escape domain name in comment

2012-10-24 Thread Jiri Denemark
On Wed, Oct 24, 2012 at 14:03:12 +0200, Ján Tomko wrote: Add virBufferEscapeShellXMLComment function that both quotes a string so shell deosn't interpert any special characters in it and makes sure that there's no -- in it, to avoid clashes with XML comments. virXMLEmitWarning is changed to

Re: [libvirt] [PATCH] xml: shell-escape domain name in comment

2012-10-24 Thread Ján Tomko
On 10/24/12 14:59, Jiri Denemark wrote: On Wed, Oct 24, 2012 at 14:03:12 +0200, Ján Tomko wrote: I should have spoken earlier but why don't we just emit UUID there? It's guaranteed that it is safe for both XML and shell and thus can be just copypasted even into interactive virsh. UUIDs are

Re: [libvirt] [PATCH] xml: shell-escape domain name in comment

2012-10-24 Thread Eric Blake
On 10/24/2012 06:03 AM, Ján Tomko wrote: Add virBufferEscapeShellXMLComment function that both quotes a string so shell deosn't interpert any special characters in it and makes sure that there's no -- in it, to avoid clashes with XML comments. virXMLEmitWarning is changed to use virBuffer