diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-05-15 13:42:41 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-05-15 13:42:41 +0000 |
commit | 45537f6b94632b2bb381a5b090f5665f7fa0b410 (patch) | |
tree | a956b117b7cc2d58ad0e6e03c2e48df0219f8d63 /usr.bin/ftp/main.c | |
parent | a41ab0b66347737359edebf92b3405b27a1f4bdb (diff) |
Display "bytes received" like the csrg ftp used to when the progressbar
is disabled.
Difference pointed out by deraadt
OK kurtm, sunil
Diffstat (limited to 'usr.bin/ftp/main.c')
-rw-r--r-- | usr.bin/ftp/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index bae68f47a53..a528266f8e0 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.127 2019/05/15 11:53:22 kmos Exp $ */ +/* $OpenBSD: main.c,v 1.128 2019/05/15 13:42:40 florian Exp $ */ /* * Copyright (c) 2015 Sunil Nimmagadda <sunil@openbsd.org> @@ -336,14 +336,16 @@ child(int sock, int argc, char **argv) } else if ((dst_fp = fdopen(fd, "w")) == NULL) err(1, "%s: fdopen", __func__); + init_stats(sz, &offset); if (progressmeter) { p = basename(url->path); - start_progress_meter(p, title, sz, &offset); + start_progress_meter(p, title); } url_save(url, dst_fp, &offset); if (progressmeter) stop_progress_meter(); + finish_stats(); if (!tostdout) fclose(dst_fp); |