From 184654117eac112e7004eff0f0f7eaf055edea75 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 6 Sep 2016 13:14:34 +0200 Subject: [PATCH] virsh: Fix *-event error string When using virsh net-event non-existing-net the error message says that 'either --list or event type is required' This is misleading as 'virsh net-event $valid-event-type' is not going to work either. What is expected is 'virsh net-event --event $valid-event-type' This commit fixes the string in pool-event, nodedev-event, event, and net-event. --- tools/virsh-domain.c | 2 +- tools/virsh-network.c | 2 +- tools/virsh-nodedev.c | 2 +- tools/virsh-pool.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index a614512838..035ee01c34 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -12694,7 +12694,7 @@ cmdEvent(vshControl *ctl, const vshCmd *cmd) } } else if (!all) { vshError(ctl, "%s", - _("one of --list, --all, or event type is required")); + _("one of --list, --all, or --event is required")); return false; } diff --git a/tools/virsh-network.c b/tools/virsh-network.c index eec7faf7b8..431a750fb6 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -1238,7 +1238,7 @@ cmdNetworkEvent(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptStringReq(ctl, cmd, "event", &eventName) < 0) return false; if (!eventName) { - vshError(ctl, "%s", _("either --list or event type is required")); + vshError(ctl, "%s", _("either --list or --event is required")); return false; } if ((event = virshNetworkEventIdTypeFromString(eventName)) < 0) { diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c index 805c0ffe71..321f15cb70 100644 --- a/tools/virsh-nodedev.c +++ b/tools/virsh-nodedev.c @@ -903,7 +903,7 @@ cmdNodeDeviceEvent(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptStringReq(ctl, cmd, "event", &eventName) < 0) return false; if (!eventName) { - vshError(ctl, "%s", _("either --list or event type is required")); + vshError(ctl, "%s", _("either --list or --event is required")); return false; } diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index d25851e943..3bc96b204d 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -2057,7 +2057,7 @@ cmdPoolEvent(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptStringReq(ctl, cmd, "event", &eventName) < 0) return false; if (!eventName) { - vshError(ctl, "%s", _("either --list or event type is required")); + vshError(ctl, "%s", _("either --list or --event is required")); return false; } -- GitLab