[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 06/10] list: Add helper to convert strings separated by ', ' to array



On 09/04/2012 09:16 AM, Osier Yang wrote:
> tools/virsh.c: New helper function vshStringToArray.
> tools/virsh.h: Declare vshStringToArray.
> tools/virsh-domain.c: use the helper in cmdUndefine.
> ---
>  tools/virsh-domain.c |   19 ++-----------------
>  tools/virsh.c        |   44 ++++++++++++++++++++++++++++++++++++++++++++
>  tools/virsh.h        |    1 +
>  3 files changed, 47 insertions(+), 17 deletions(-)

ACK.  This is a nice refactor for later use.

But down the road, do we want to borrow a leaf from qemu's book, and
allow for users to input ',,' for a literal comma that does not separate
options?  If so, then we should merge in the double comma handling from
vshParseSnapshotDiskspec (virsh-snapshot.c) into this function, and have
that function also refactored to use this helper.  Without something
like that, users cannot input a literal comma when listing
comma-separated arguments.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]