From: Sami Kerola Date: Sun, 4 Sep 2016 15:33:25 +0000 (+0100) Subject: bug fix: long option --gracetime is correct, --graceperiod is not X-Git-Tag: v0.88~26^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=561009804624880422c98819d6de646123d6bc78;p=thirdparty%2Fmtr.git bug fix: long option --gracetime is correct, --graceperiod is not Commit 5dbeb8f1b4084c38103e92dbd028da2762c1f0a9 introduced new long option --gracetime, that was documented as --graceperiod. Only one or the other can be correct, so pick the --gracetime and update documentation to tell this is, the expected long option. --- diff --git a/bash-completion/mtr b/bash-completion/mtr index f9903d1..4d9d5dd 100644 --- a/bash-completion/mtr +++ b/bash-completion/mtr @@ -27,7 +27,7 @@ _mtr_module() COMPREPLY=( $(compgen -W "SIZE" -- $cur) ) return 0 ;; - '-i'|'--interval'|'-G'|'--graceperiod'|'-Z'|'--timeout') + '-i'|'--interval'|'-G'|'--gracetime'|'-Z'|'--timeout') COMPREPLY=( $(compgen -W "SECONDS" -- $cur) ) return 0 ;; @@ -53,7 +53,7 @@ _mtr_module() OPTS=' --filename --inet --inet6 --udp --tcp --address --first-ttl --max-ttl --max-unknown --port --localport --psize --bitpattern - --interval --graceperiod --tos --mpls --timeout --mark --report + --interval --gracetime --tos --mpls --timeout --mark --report --report-wide --report-cycles --json --xml --csv --raw --split --curses --displaymode --gtk --no-dns --show-ips --order --ipinfo --aslookup --help --version diff --git a/mtr.8.in b/mtr.8.in index 6e3757f..3e549a9 100644 --- a/mtr.8.in +++ b/mtr.8.in @@ -350,7 +350,7 @@ Specifies bit pattern to use in payload. Should be within range 0 - 255. If .I NUM is greater than 255, a random pattern is used. .TP -.B \-G \fISECONDS\fR, \fB\-\-graceperiod \fISECONDS +.B \-G \fISECONDS\fR, \fB\-\-gracetime \fISECONDS Use this option to specify the positive number of seconds to wait for responses after the final request. The default value is five seconds. .TP diff --git a/mtr.c b/mtr.c index e28b0f2..bd6a18c 100644 --- a/mtr.c +++ b/mtr.c @@ -112,7 +112,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out) fputs(" -s, --psize PACKETSIZE set the packet size used for probing\n", out); fputs(" -B, --bitpattern NUMBER set bit pattern to use in payload\n", out); fputs(" -i, --interval SECONDS icmp echo request interval\n", out); - fputs(" -G, --graceperiod SECONDS number of seconds to wait for responses\n", out); + fputs(" -G, --gracetime SECONDS number of seconds to wait for responses\n", out); fputs(" -Q, --tos NUMBER type of service field in IP header\n", out); fputs(" -e, --mpls display information from ICMP extensions\n", out); fputs(" -Z, --timeout SECONDS seconds to keep the TCP socket open\n", out); @@ -322,7 +322,7 @@ static void parse_arg (struct mtr_ctl *ctl, int argc, char **argv) { "port", 1, NULL, 'P' }, /* target port number for TCP/SCTP/UDP */ { "localport", 1, NULL, 'L' }, /* source port number for UDP */ { "timeout", 1, NULL, 'Z' }, /* timeout for TCP sockets */ - { "gracetime", 1, NULL, 'G' }, /* graceperiod for replies after last probe */ + { "gracetime", 1, NULL, 'G' }, /* gracetime for replies after last probe */ #ifdef SO_MARK { "mark", 1, NULL, 'M' }, /* use SO_MARK */ #endif