lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0dd14879918ec69e067eace196dad9dca63f824a.1606774951.git.me@pmachata.org>
Date:   Mon, 30 Nov 2020 23:59:37 +0100
From:   Petr Machata <me@...chata.org>
To:     netdev@...r.kernel.org, dsahern@...il.com,
        stephen@...workplumber.org
Cc:     Po.Liu@....com, toke@...e.dk, dave.taht@...il.com,
        edumazet@...gle.com, tahiliani@...k.edu.in, vtlam@...gle.com,
        leon@...nel.org, Petr Machata <me@...chata.org>
Subject: [PATCH iproute2-next 1/6] 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 <me@...chata.org>
---
 include/utils.h | 1 -
 ip/ip_common.h  | 2 ++
 tc/tc_common.h  | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/utils.h b/include/utils.h
index 588fceb72442..01454f71cb1a 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 d604f7554405..bba15f87ab94 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 802fb7f01fe4..58dc9d6a6c4f 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;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ