summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fetch/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/fetch/main.c b/usr.bin/fetch/main.c
index 6f4d85c..2f60719 100644
--- a/usr.bin/fetch/main.c
+++ b/usr.bin/fetch/main.c
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
-/* $Id: main.c,v 1.26 1996/10/31 14:24:35 phk Exp $ */
+/* $Id: main.c,v 1.27 1996/11/10 14:46:50 peter Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
@@ -301,9 +301,13 @@ ftpget()
}
if ((lp = getenv("FTP_LOGIN")) == NULL)
lp = "anonymous";
- ftp = ftpLogin(host, lp, ftp_pw, 0, ftp_verbose);
- if (!ftp)
- err(1, "couldn't open FTP connection or login to %s.", host);
+ ftp = ftpLogin(host, lp, ftp_pw, 0, ftp_verbose, &status);
+ if (!ftp) {
+ if (status)
+ errx(1, "%s: %s", host, ftpErrString(status));
+ else
+ err(1, "couldn't open FTP connection to %s.", host);
+ }
/* Time to set our defaults */
ftpBinary (ftp);
OpenPOWER on IntegriCloud