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(a)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.