From: Peter Krempa Date: Thu, 21 Aug 2014 07:58:34 +0000 (+0200) Subject: virsh: Don't print extra '-'s in error message for -k and -K options X-Git-Tag: v1.2.8-rc1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b470a38fa99a9567dc4a832d93f4aaf6cc782e0b;p=thirdparty%2Flibvirt.git virsh: Don't print extra '-'s in error message for -k and -K options The error message contains one extra dash. --- diff --git a/tools/virsh.c b/tools/virsh.c index 3927120e15..30a84c1591 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -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); }