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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200816152508.2285431-1-andrew@lunn.ch>
Date:   Sun, 16 Aug 2020 17:25:08 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     netdev <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>
Subject: [PATCH ethtool] cable-test: TDR Amplitude is signed

Use the signed JSON helper for printing the TDR amplitude. Otherwise
negative values, i.e. cable shorts, become very large positive values.

Signed-off-by: Andrew Lunn <andrew@...n.ch>
---
 netlink/cable_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netlink/cable_test.c b/netlink/cable_test.c
index d39b7d8..8a71453 100644
--- a/netlink/cable_test.c
+++ b/netlink/cable_test.c
@@ -354,7 +354,7 @@ static int nl_cable_test_tdr_ntf_attr(struct nlattr *evattr)
 
 		open_json_object(NULL);
 		print_string(PRINT_ANY, "pair", "%s ", nl_pair2txt(pair));
-		print_uint(PRINT_ANY, "amplitude", "Amplitude %4d\n", mV);
+		print_int(PRINT_ANY, "amplitude", "Amplitude %4d\n", mV);
 		close_json_object();
 		break;
 	}
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ