[PATCH] progressmeter: display of transfer speeds > 2GB/s
Damien Miller
djm at mindrot.org
Sat Mar 28 18:17:54 AEDT 2026
On Tue, 24 Mar 2026, Theo de Raadt wrote:
> They should probably should be long long.
agree. The source data (bytes moved) is an off_t, so I don't think more
casts are required.
ok?
diff --git a/progressmeter.c b/progressmeter.c
index dab49b7..021c9c4 100644
--- a/progressmeter.c
+++ b/progressmeter.c
@@ -65,7 +65,7 @@ static off_t end_pos; /* ending position of transfer */
static off_t cur_pos; /* transfer position as of last refresh */
static volatile off_t *counter; /* progress counter */
static long stalled; /* how long we have been stalled */
-static int bytes_per_second; /* current speed in bytes per second */
+static long long bytes_per_second; /* current speed in bytes per second */
static int win_size; /* terminal window size */
static volatile sig_atomic_t win_resized; /* for window resizing */
static volatile sig_atomic_t alarm_fired;
@@ -126,7 +126,7 @@ refresh_progress_meter(int force_update)
double elapsed, now;
int percent;
off_t bytes_left;
- int cur_speed;
+ long long cur_speed;
int hours, minutes, seconds;
int file_len, cols;
More information about the openssh-unix-dev
mailing list