aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2000-07-21 11:08:03 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2000-07-21 11:08:03 +0000
commitd939bf77d24e20be2a2f12cfb43095a4f9c6eff5 (patch)
tree56b41faab8d36892ffc8c9a7ee2fc02ab07176ca /usr.bin/fetch
parentc78f1cc912c84fd5aacdafea557bb94b7bd7e9aa (diff)
downloadsrc-d939bf77d24e20be2a2f12cfb43095a4f9c6eff5.tar.gz
src-d939bf77d24e20be2a2f12cfb43095a4f9c6eff5.zip
Don't display a running count in quiet mode.
Don't add the offset to the size; it's libfetch's job to report the correct size of the requested file.
Notes
Notes: svn path=/head/; revision=63717
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/fetch.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 18e55691e89c..fd97d5c1c681 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -113,7 +113,7 @@ stat_display(struct xferstat *xs, int force)
{
struct timeval now;
- if (!v_tty)
+ if (!v_tty || !v_level)
return;
gettimeofday(&now, NULL);
@@ -290,6 +290,12 @@ fetch(char *URL, char *path)
goto success;
}
+ if (v_level > 1) {
+ if (sb.st_size)
+ warnx("local: %lld / %ld", sb.st_size, sb.st_mtime);
+ warnx("remote: %lld / %ld", us.size, us.mtime);
+ }
+
/* open output file */
if (o_stdout) {
/* output to stdout */
@@ -307,7 +313,6 @@ fetch(char *URL, char *path)
if (sigint)
goto signal;
} else {
- us.size += url->offset;
if (us.size == sb.st_size)
/* nothing to do */
goto success;