]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
bug fix: long option --gracetime is correct, --graceperiod is not
authorSami Kerola <kerolasa@iki.fi>
Sun, 4 Sep 2016 15:33:25 +0000 (16:33 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sun, 4 Sep 2016 15:39:08 +0000 (16:39 +0100)
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.

bash-completion/mtr
mtr.8.in
mtr.c

index f9903d1f4754f3cd64a56853ffd4540ce822cb0e..4d9d5dd18004fc39135136d4bb3540eeb58931ed 100644 (file)
@@ -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
index 6e3757fda1b82024b2c70c7edba2e894209b60eb..3e549a9cd321ffaac29613ea27070316539f4490 100644 (file)
--- 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 e28b0f27bbe29f7bf5b04dfa1f07013b238c37fa..bd6a18c92ccf81ad3832f9b773c3d70eeb6c391e 100644 (file)
--- 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