use herror
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 12 Oct 1988 06:59:59 +0000 (22:59 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 12 Oct 1988 06:59:59 +0000 (22:59 -0800)
SCCS-vsn: usr.bin/ftp/ftp.c 5.22

usr/src/usr.bin/ftp/ftp.c

index af921fc..d50edea 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)ftp.c      5.21 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftp.c      5.22 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "ftp_var.h"
 #endif /* not lint */
 
 #include "ftp_var.h"
@@ -68,7 +68,8 @@ hookup(host, port)
        else {
                hp = gethostbyname(host);
                if (hp == NULL) {
        else {
                hp = gethostbyname(host);
                if (hp == NULL) {
-                       printf("%s: unknown host\n", host);
+                       fprintf(stderr, "ftp: %s: ", host);
+                       herror((char *)NULL);
                        code = -1;
                        return((char *) 0);
                }
                        code = -1;
                        return((char *) 0);
                }