Re: [libvirt] [PATCHv2 1/3] virsh: modify vshStringToArray to duplicate the elements too

2013-08-20 Thread Peter Krempa
On 08/20/13 17:56, Eric Blake wrote: > On 08/20/2013 09:45 AM, Peter Krempa wrote: > +++ b/tools/virsh.h @@ -37,6 +37,7 @@ # include "virerror.h" # include "virthread.h" # include "virnetdevbandwidth.h" +# include "virstring.h" >>> >>> Is this change necessary? >>>

Re: [libvirt] [PATCHv2 1/3] virsh: modify vshStringToArray to duplicate the elements too

2013-08-20 Thread Eric Blake
On 08/20/2013 09:45 AM, Peter Krempa wrote: >>> +++ b/tools/virsh.h >>> @@ -37,6 +37,7 @@ >>> # include "virerror.h" >>> # include "virthread.h" >>> # include "virnetdevbandwidth.h" >>> +# include "virstring.h" >> >> Is this change necessary? >> > > It's to import virStringFreeList to virsh as

Re: [libvirt] [PATCHv2 1/3] virsh: modify vshStringToArray to duplicate the elements too

2013-08-20 Thread Peter Krempa
On 08/20/13 17:42, Eric Blake wrote: > On 08/20/2013 08:15 AM, Peter Krempa wrote: >> At a slightly larger memory expense allow stealing of items from the >> string array returned from vshStringToArray and turn the result into a >> string list compatible with virStringSplit. This will allow to use

Re: [libvirt] [PATCHv2 1/3] virsh: modify vshStringToArray to duplicate the elements too

2013-08-20 Thread Osier Yang
On 20/08/13 23:42, Eric Blake wrote: On 08/20/2013 08:15 AM, Peter Krempa wrote: At a slightly larger memory expense allow stealing of items from the string array returned from vshStringToArray and turn the result into a string list compatible with virStringSplit. This will allow to use the comm

Re: [libvirt] [PATCHv2 1/3] virsh: modify vshStringToArray to duplicate the elements too

2013-08-20 Thread Eric Blake
On 08/20/2013 08:15 AM, Peter Krempa wrote: > At a slightly larger memory expense allow stealing of items from the > string array returned from vshStringToArray and turn the result into a > string list compatible with virStringSplit. This will allow to use the > common dealloc function. > > This p

Re: [libvirt] [PATCHv2 1/3] virsh: modify vshStringToArray to duplicate the elements too

2013-08-20 Thread Osier Yang
On 20/08/13 22:15, Peter Krempa wrote: At a slightly larger memory expense allow stealing of items from the string array returned from vshStringToArray and turn the result into a string list compatible with virStringSplit. This will allow to use the common dealloc function. This patch also fixes

[libvirt] [PATCHv2 1/3] virsh: modify vshStringToArray to duplicate the elements too

2013-08-20 Thread Peter Krempa
At a slightly larger memory expense allow stealing of items from the string array returned from vshStringToArray and turn the result into a string list compatible with virStringSplit. This will allow to use the common dealloc function. This patch also fixes a few forgotten checks of return from vs