]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Move the use_iec declaration to the tools
authorPetr Machata <me@pmachata.org>
Sat, 5 Dec 2020 21:13:29 +0000 (22:13 +0100)
committerDavid Ahern <dsahern@gmail.com>
Wed, 9 Dec 2020 02:28:43 +0000 (02:28 +0000)
The tools "ip" and "tc" use a flag "use_iec", which indicates whether, when
formatting rate values, the prefixes "K", "M", etc. should refer to powers
of 1024, or powers of 1000. The flag is currently kept as a global variable
in "ip" and "tc", but is nonetheless declared in util.h.

Instead, move the declaration to tool-specific headers ip/ip_common.h and
tc/tc_common.h.

Signed-off-by: Petr Machata <me@pmachata.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
include/utils.h
ip/ip_common.h
tc/tc_common.h

index 588fceb724421a93e71bf900e06d85a89c8bba85..01454f71cb1ad28a58f2cb8accc13ca72dfb45c1 100644 (file)
@@ -20,7 +20,6 @@
 
 extern int preferred_family;
 extern int human_readable;
-extern int use_iec;
 extern int show_stats;
 extern int show_details;
 extern int show_raw;
index 227eddd3baf2972252a283dbb419f398c41bc3e1..9a31e837563f3e1ff18b2d249ac61b8f69f67360 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "json_print.h"
 
+extern int use_iec;
+
 struct link_filter {
        int ifindex;
        int family;
index 802fb7f01fe440cd2c5ec5878fa7829976984b9f..58dc9d6a6c4fb541971aab3141a98ad42dd26cfd 100644 (file)
@@ -27,3 +27,4 @@ int check_size_table_opts(struct tc_sizespec *s);
 
 extern int show_graph;
 extern bool use_names;
+extern int use_iec;