[libvirt] [PATCH 4/6] virsh: Make perf accept event list separated by commas

Peter Krempa pkrempa at redhat.com
Thu Mar 31 07:11:18 UTC 2016


On Thu, Mar 31, 2016 at 07:28:59 +0200, Michal Privoznik wrote:
> Everywhere else we use a comma separated list. There's no good
> reason to make 'perf' command an exception. Currently, it accepts
> string list separated by '|'.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  tools/virsh-domain.c |  2 +-
>  tools/virsh.pod      | 17 +++++++++--------
>  2 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index a09cdec..2dbb890 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -8575,7 +8575,7 @@ virshParseEventStr(vshControl *ctl,
>      size_t i, ntok;
>      int ret = -1;
>  
> -    if (!(tok = virStringSplitCount(event, "|", 0, &ntok)))
> +    if (!(tok = virStringSplitCount(event, ",", 0, &ntok)))
>          return -1;
>  
>      if (ntok > VIR_PERF_EVENT_LAST) {

While at it, you could also remove this condition. It doesn't make sense
with typed param apis and hinders forward compatibility.

ACK with or without the condition removed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160331/996fce54/attachment-0001.sig>


More information about the libvir-list mailing list