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.
This commit is contained in:
Christophe Fergeau 2016-09-06 13:14:34 +02:00
parent fe94ee5db5
commit 184654117e
4 changed files with 4 additions and 4 deletions

View File

@ -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 <type> is required"));
return false;
}

View File

@ -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 <type> is required"));
return false;
}
if ((event = virshNetworkEventIdTypeFromString(eventName)) < 0) {

View File

@ -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 <type> is required"));
return false;
}

View File

@ -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 <type> is required"));
return false;
}