[PATCH] progressmeter: display of transfer speeds > 2GB/s
SERVANT Cyril
cyril.servant at cea.fr
Mon Mar 30 19:37:14 AEDT 2026
On 3/28/26 08:17, Damien Miller wrote:
> 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?
Thank you Theo and Damien. Looks good to me. I tested it and can confirm
it works as intended.
>
> 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