]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: man: change man page and comment to confirm to code's behavior.
authorLi Wei <lw@cn.fujitsu.com>
Wed, 11 Jul 2012 15:56:57 +0000 (15:56 +0000)
committerStephen Hemminger <shemminger@vyatta.com>
Thu, 12 Jul 2012 16:05:28 +0000 (09:05 -0700)
Since the get_rate() code incorrectly interpreted bare number, the
behavior is not the same as man page and comment described.

We need to change the man page and comment for compatible with the
existing usage by scripts.

man/man8/tc.8
tc/tc_util.c

index 346c5455219bd1f30bab2ea841705fd090d64011..95571a3eebb02a300d6506f781a5d59280793a04 100644 (file)
@@ -259,6 +259,9 @@ All parameters accept a floating point number, possibly followed by a unit.
 .P
 Bandwidths or rates can be specified in:
 .TP
+bps
+Bytes per second
+.TP
 kbps
 Kilobytes per second
 .TP
@@ -271,8 +274,8 @@ Kilobits per second
 mbit
 Megabits per second
 .TP
-bps or a bare number
-Bytes per second
+bit or a bare number
+Bits per second
 .P
 Amounts of data can be specified in:
 .TP
index 926ed08bd4edc159c4cc93d15bf19b4583cecc0f..ccf8fa4dcc1a72eb21c9d82306cdbdc8113c47d7 100644 (file)
@@ -153,7 +153,7 @@ int get_rate(unsigned *rate, const char *str)
                return -1;
 
        if (*p == '\0') {
-               *rate = bps / 8.;       /* assume bytes/sec */
+               *rate = bps / 8.;       /* assume bits/sec */
                return 0;
        }