- readable_size(history_totals.total_sent, line, 10, 1024, 1);
+ /* Previous versions of iftop always displayed totals in bytes, even when
+ use-bytes = false. Stay compatible when the default unit hasn't been
+ changed. */
+ cumunit = options.bandwidth_unit;
+ if (cumunit == OPTION_BW_BITS)
+ cumunit = OPTION_BW_BYTES;
+ readable_size(history_totals.total_sent, line, 10, 1024, cumunit);