summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>2001-07-28 21:34:56 +0000
committerse <se@FreeBSD.org>2001-07-28 21:34:56 +0000
commit815cafd7d003ae1cb5ded9f15c5bdf81040a3582 (patch)
tree2b4afad2c4bcb024a8794fc63a8ba6d8316fdb09 /usr.bin
parent742d7aada7ccb39404281e71f3d8f4aacc5d8ed0 (diff)
downloadFreeBSD-src-815cafd7d003ae1cb5ded9f15c5bdf81040a3582.zip
FreeBSD-src-815cafd7d003ae1cb5ded9f15c5bdf81040a3582.tar.gz
Include value of command line argument that causes an error message or
warning in said message, since fetch may be run from a makefile or script which does not print the command line. Approved by: des
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fetch/fetch.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 8fdd609..2cce636724 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -1,3 +1,4 @@
+
/*-
* Copyright (c) 2000 Dag-Erling Coïdan Smørgrav
* All rights reserved.
@@ -597,7 +598,7 @@ main(int argc, char *argv[])
break;
case 'B':
if (parseoff(optarg, &B_size) == -1)
- errx(1, "invalid buffer size");
+ errx(1, "invalid buffer size (%s)", optarg);
break;
case 'b':
warnx("warning: the -b option is deprecated");
@@ -657,14 +658,14 @@ main(int argc, char *argv[])
break;
case 'S':
if (parseoff(optarg, &S_size) == -1)
- errx(1, "invalid size");
+ errx(1, "invalid size (%s)", optarg);
break;
case 's':
s_flag = 1;
break;
case 'T':
if (parseint(optarg, &T_secs) == -1)
- errx(1, "invalid timeout");
+ errx(1, "invalid timeout (%s)", optarg);
break;
case 't':
t_flag = 1;
@@ -679,7 +680,7 @@ main(int argc, char *argv[])
case 'w':
a_flag = 1;
if (parseint(optarg, &w_secs) == -1)
- errx(1, "invalid delay");
+ errx(1, "invalid delay (%s)", optarg);
break;
default:
usage();
@@ -717,13 +718,15 @@ main(int argc, char *argv[])
/* timeouts */
if ((s = getenv("FTP_TIMEOUT")) != NULL) {
if (parseint(s, &ftp_timeout) == -1) {
- warnx("FTP_TIMEOUT is not a positive integer");
+ warnx("FTP_TIMEOUT (%s) is not a positive integer",
+ optarg);
ftp_timeout = 0;
}
}
if ((s = getenv("HTTP_TIMEOUT")) != NULL) {
if (parseint(s, &http_timeout) == -1) {
- warnx("HTTP_TIMEOUT is not a positive integer");
+ warnx("HTTP_TIMEOUT (%s) is not a positive integer",
+ optarg);
http_timeout = 0;
}
}
OpenPOWER on IntegriCloud