diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-01-30 10:38:26 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-01-30 10:38:26 +0000 |
commit | fc1725b12ffae83614d3792ec9a8fae764fa8213 (patch) | |
tree | 5b2963169a97ac6fc0a40498e9dd008ade9e6ca1 /system/openssh/openssh7.4-peaktput.patch | |
parent | ae3f7a857962a758a7783cb4d343760a9582478d (diff) | |
download | packages-fc1725b12ffae83614d3792ec9a8fae764fa8213.tar.gz packages-fc1725b12ffae83614d3792ec9a8fae764fa8213.tar.bz2 packages-fc1725b12ffae83614d3792ec9a8fae764fa8213.tar.xz packages-fc1725b12ffae83614d3792ec9a8fae764fa8213.zip |
system/openssh: Bump to 8.1p1, fixes for time64
Diffstat (limited to 'system/openssh/openssh7.4-peaktput.patch')
-rw-r--r-- | system/openssh/openssh7.4-peaktput.patch | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/system/openssh/openssh7.4-peaktput.patch b/system/openssh/openssh7.4-peaktput.patch deleted file mode 100644 index 6fc6140a6..000000000 --- a/system/openssh/openssh7.4-peaktput.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- a/progressmeter.c -+++ b/progressmeter.c -@@ -69,6 +69,8 @@ - static off_t start_pos; /* initial position of transfer */ - static off_t end_pos; /* ending position of transfer */ - static off_t cur_pos; /* transfer position as of last refresh */ -+static off_t last_pos; -+static off_t max_delta_pos = 0; - 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 */ -@@ -128,12 +130,17 @@ - int hours, minutes, seconds; - int i, len; - int file_len; -+ off_t delta_pos; - - transferred = *counter - (cur_pos ? cur_pos : start_pos); - cur_pos = *counter; - now = monotime_double(); - bytes_left = end_pos - cur_pos; - -+ delta_pos = cur_pos - last_pos; -+ if (delta_pos > max_delta_pos) -+ max_delta_pos = delta_pos; -+ - if (bytes_left > 0) - elapsed = now - last_update; - else { -@@ -158,7 +165,7 @@ - - /* filename */ - buf[0] = '\0'; -- file_len = win_size - 35; -+ file_len = win_size - 45; - if (file_len > 0) { - len = snprintf(buf, file_len + 1, "\r%s", file); - if (len < 0) -@@ -188,6 +195,15 @@ - (off_t)bytes_per_second); - strlcat(buf, "/s ", win_size); - -+ /* instantaneous rate */ -+ if (bytes_left > 0) -+ format_rate(buf + strlen(buf), win_size - strlen(buf), -+ delta_pos); -+ else -+ format_rate(buf + strlen(buf), win_size - strlen(buf), -+ max_delta_pos); -+ strlcat(buf, "/s ", win_size); -+ - /* ETA */ - if (!transferred) - stalled += elapsed; -@@ -224,6 +240,7 @@ - - atomicio(vwrite, STDOUT_FILENO, buf, win_size - 1); - last_update = now; -+ last_pos = cur_pos; - } - - /*ARGSUSED*/ |