tibbs / rpms / iftop

Forked from rpms/iftop 6 years ago
Clone
Blob Blame History Raw
Backported patch from Marcin Kryczek <mkay@gentoo.org> for iftop >= 0.17,
to display top scale in bytes when measuring in bytes.

--- iftop-0.17/ui.c			2005-10-26 22:12:33.000000000 +0200
+++ iftop-0.17/ui.c.bandwidth		2006-06-22 21:36:16.000000000 +0200
@@ -263,7 +263,7 @@
             char s[40], *p;
             int x;
             /* This 1024 vs 1000 stuff is just plain evil */
-            readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, 0);
+            readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, options.bandwidth_in_bytes);
             p = s + strspn(s, " ");
             x = get_bar_length(i * 8);
             mvaddch(*y + 1, x, ACS_BTEE);