diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index a1d4a75747457c3255d57cad6944a8676fa88d57..4a73a80c2eb258332fc66509e22c706fa2fb97d5 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8623,13 +8623,13 @@ cmdPerf(vshControl *ctl, const vshCmd *cmd) if (live) flags |= VIR_DOMAIN_AFFECT_LIVE; - if (!(dom = virshCommandOptDomain(ctl, cmd, NULL))) - return false; - if (vshCommandOptStringReq(ctl, cmd, "enable", &enable) < 0 || vshCommandOptStringReq(ctl, cmd, "disable", &disable) < 0) return false; + if (!(dom = virshCommandOptDomain(ctl, cmd, NULL))) + return false; + if (enable && virshParseEventStr(enable, true, ¶ms, &nparams, &maxparams) < 0) goto cleanup;