From: Petr Machata Date: Sat, 5 Dec 2020 21:13:29 +0000 (+0100) Subject: Move the use_iec declaration to the tools X-Git-Tag: v5.11.0~32^2~5^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd94253154a4797cb9349dff02556b1c56069f5;p=thirdparty%2Fiproute2.git Move the use_iec declaration to the tools 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 Signed-off-by: David Ahern --- diff --git a/include/utils.h b/include/utils.h index 588fceb72..01454f71c 100644 --- a/include/utils.h +++ b/include/utils.h @@ -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; diff --git a/ip/ip_common.h b/ip/ip_common.h index 227eddd3b..9a31e8375 100644 --- a/ip/ip_common.h +++ b/ip/ip_common.h @@ -6,6 +6,8 @@ #include "json_print.h" +extern int use_iec; + struct link_filter { int ifindex; int family; diff --git a/tc/tc_common.h b/tc/tc_common.h index 802fb7f01..58dc9d6a6 100644 --- a/tc/tc_common.h +++ b/tc/tc_common.h @@ -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;