]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virsh: Don't print extra '-'s in error message for -k and -K options
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Aug 2014 07:58:34 +0000 (09:58 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 21 Aug 2014 07:58:34 +0000 (09:58 +0200)
The error message contains one extra dash.

tools/virsh.c

index 3927120e15f35d9f8b1a9bc4bbf7890fbf70f5a7..30a84c15916104708c4ce828324fc6e4b91c49ac 100644 (file)
@@ -3472,7 +3472,7 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
         case 'k':
             if (virStrToLong_i(optarg, NULL, 0, &keepalive) < 0 ||
                 keepalive < 0) {
-                vshError(ctl, _("option -%s requires a positive numeric argument"),
+                vshError(ctl, _("option %s requires a positive numeric argument"),
                          longindex == -1 ? "-k" : "--keepalive-interval");
                 exit(EXIT_FAILURE);
             }
@@ -3481,7 +3481,7 @@ vshParseArgv(vshControl *ctl, int argc, char **argv)
         case 'K':
             if (virStrToLong_i(optarg, NULL, 0, &keepalive) < 0 ||
                 keepalive < 0) {
-                vshError(ctl, _("option -%s requires a positive numeric argument"),
+                vshError(ctl, _("option %s requires a positive numeric argument"),
                          longindex == -1 ? "-K" : "--keepalive-count");
                 exit(EXIT_FAILURE);
             }