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

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

 



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@xxxxxxxxxx>
> ---
>  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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]