summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-11-27 20:52:07 +0000
committerdes <des@FreeBSD.org>2002-11-27 20:52:07 +0000
commit3eb14891e1a84383e91bc8939ef4454c22b7cdd3 (patch)
tree3ed31b7b35b8c2a4b0ad6a7bdcde768e5cc768f4 /usr.bin/fetch
parenta31817b54752874d4400973f83da39a2e8ec25e1 (diff)
downloadFreeBSD-src-3eb14891e1a84383e91bc8939ef4454c22b7cdd3.zip
FreeBSD-src-3eb14891e1a84383e91bc8939ef4454c22b7cdd3.tar.gz
Use the URL instead of the output file name when reporting errors relating
to the remote document. PR: 33856 MFC after: 1 week Approved by: re
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/fetch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index c40b8b6..63cd733 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -392,7 +392,7 @@ fetch(char *URL, const char *path)
if (sigalrm || sigint)
goto signal;
if (f == NULL) {
- warnx("%s: %s", path, fetchLastErrString);
+ warnx("%s: %s", URL, fetchLastErrString);
goto failure;
}
if (sigint)
@@ -401,11 +401,11 @@ fetch(char *URL, const char *path)
/* check that size is as expected */
if (S_size) {
if (us.size == -1) {
- warnx("%s: size unknown", path);
+ warnx("%s: size unknown", URL);
goto failure;
} else if (us.size != S_size) {
warnx("%s: size mismatch: expected %lld, actual %lld",
- path, (long long)S_size, (long long)us.size);
+ URL, (long long)S_size, (long long)us.size);
goto failure;
}
}
@@ -420,7 +420,7 @@ fetch(char *URL, const char *path)
}
if (us.size == -1 && !o_stdout && v_level > 0)
- warnx("%s: size of remote file is not known", path);
+ warnx("%s: size of remote file is not known", URL);
if (v_level > 1) {
if (sb.st_size != -1)
fprintf(stderr, "local size / mtime: %lld / %ld\n",
@@ -470,7 +470,7 @@ fetch(char *URL, const char *path)
if (nsb.st_dev != sb.st_dev ||
nsb.st_ino != nsb.st_ino ||
nsb.st_size != sb.st_size) {
- warnx("%s: file has changed", path);
+ warnx("%s: file has changed", URL);
fclose(of);
of = NULL;
sb = nsb;
@@ -497,7 +497,7 @@ fetch(char *URL, const char *path)
*/
url->offset = 0;
if ((f = fetchXGet(url, &us, flags)) == NULL) {
- warnx("%s: %s", path, fetchLastErrString);
+ warnx("%s: %s", URL, fetchLastErrString);
goto failure;
}
if (sigint)
OpenPOWER on IntegriCloud