diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-11-28 08:28:35 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-11-28 08:28:35 +0000 |
| commit | f72f5a58cc94fe39f63b4c32a564b34b4beb12bb (patch) | |
| tree | 85de1f56a1e62f86129732bc67fa2d895e56d96a /usr.sbin/pkg_install/lib | |
| parent | 716ca698cf8e7b43d66472ed57e8d750ba6c27fe (diff) | |
Notes
Diffstat (limited to 'usr.sbin/pkg_install/lib')
| -rw-r--r-- | usr.sbin/pkg_install/lib/file.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index 19a93ceee2fe..ea28c4752e9d 100644 --- a/usr.sbin/pkg_install/lib/file.c +++ b/usr.sbin/pkg_install/lib/file.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: file.c,v 1.23 1996/08/01 12:13:20 jkh Exp $"; +static const char *rcsid = "$Id: file.c,v 1.24 1996/10/14 19:41:44 jkh Exp $"; #endif /* @@ -24,6 +24,7 @@ static const char *rcsid = "$Id: file.c,v 1.23 1996/08/01 12:13:20 jkh Exp $"; #include "lib.h" #include <ftpio.h> +#include <netdb.h> #include <pwd.h> #include <time.h> #include <sys/wait.h> @@ -180,7 +181,7 @@ fileGetURL(char *base, char *spec) struct passwd *pw; FILE *ftp; pid_t tpid; - int i; + int i, status; char *hint; rp = NULL; @@ -246,7 +247,7 @@ fileGetURL(char *base, char *spec) } if (Verbose) printf("Trying to fetch %s.\n", fname); - ftp = ftpGetURL(fname, uname, pword); + ftp = ftpGetURL(fname, uname, pword, &status); if (ftp) { pen[0] = '\0'; if ((rp = make_playpen(pen, 0)) != NULL) { @@ -272,7 +273,9 @@ fileGetURL(char *base, char *spec) fclose(ftp); } else - printf("Error: FTP Unable to get %s\n", fname); + printf("Error: FTP Unable to get %s: %s\n", + fname, + status ? ftpErrString(status) : hstrerror(h_errno)); return rp; } |
