Re: [libvirt] [PATCH] Add a virStrSplitQuoted for splitting quoted strings

2012-03-14 Thread Daniel P. Berrange
On Wed, Mar 14, 2012 at 11:10:24AM -0600, Eric Blake wrote: > On 03/14/2012 10:50 AM, Daniel P. Berrange wrote: > >> This looks like it is repeating some of the code in > >> virsh.c:vshCommandStringGetArg; any chance we can combine them? In > >> particular, the ability to mimic shell handling of \

Re: [libvirt] [PATCH] Add a virStrSplitQuoted for splitting quoted strings

2012-03-14 Thread Eric Blake
On 03/14/2012 10:50 AM, Daniel P. Berrange wrote: >> This looks like it is repeating some of the code in >> virsh.c:vshCommandStringGetArg; any chance we can combine them? In >> particular, the ability to mimic shell handling of \ escapes, as well as >> the difference in behavior of \ inside "" vs

Re: [libvirt] [PATCH] Add a virStrSplitQuoted for splitting quoted strings

2012-03-14 Thread Daniel P. Berrange
On Wed, Mar 14, 2012 at 10:40:41AM -0600, Eric Blake wrote: > On 03/14/2012 09:19 AM, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > To facilitate parsing of argv[] style strings, provide a > > virStrSplitQuoted API which will split a string on the listed > > separators, but als

Re: [libvirt] [PATCH] Add a virStrSplitQuoted for splitting quoted strings

2012-03-14 Thread Eric Blake
On 03/14/2012 09:19 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > To facilitate parsing of argv[] style strings, provide a > virStrSplitQuoted API which will split a string on the listed > separators, but also allow for quoting with ' or ". > > * src/libvirt_private.syms, src/ut

[libvirt] [PATCH] Add a virStrSplitQuoted for splitting quoted strings

2012-03-14 Thread Daniel P. Berrange
From: "Daniel P. Berrange" To facilitate parsing of argv[] style strings, provide a virStrSplitQuoted API which will split a string on the listed separators, but also allow for quoting with ' or ". * src/libvirt_private.syms, src/util/util.c, src/util/util.h: Implement virStrSplitQuoted * test