]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Fix *-event error string
authorChristophe Fergeau <cfergeau@redhat.com>
Tue, 6 Sep 2016 11:14:34 +0000 (13:14 +0200)
committerChristophe Fergeau <cfergeau@redhat.com>
Thu, 8 Sep 2016 07:54:12 +0000 (09:54 +0200)
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
tools/virsh-network.c
tools/virsh-nodedev.c
tools/virsh-pool.c

index a614512838f8057d6383f2b9e20077c0b3c1a811..035ee01c3429638845e49a26662514d1c701d68d 100644 (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;
     }
 
index eec7faf7b8909f8b28450be68f3a7bf8a36fa850..431a750fb6ead18283de61f718afd19d5c7efea7 100644 (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) {
index 805c0ffe71d0b201b030ede322789273cc734af0..321f15cb704e330b43ca352179697cc672aae788 100644 (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;
     }
 
index d25851e943a866d143f2acc28977af0b425c9b14..3bc96b204dd913c4ce705d387ccf5e0a2da411e6 100644 (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;
     }