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

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



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 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.

Attachment: signature.asc
Description: Digital signature


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