diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-10-04 03:18:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-10-04 03:18:39 +0000 |
commit | 84e8e1847b7addeb5a21b4ea164b16cfe9e0ae8e (patch) | |
tree | a7f7f7b99aee13714f38a31d494022f11ad5c378 /usr.bin/whois | |
parent | e12450c0d15ddd5cb7a5d156d7a5c3270c9a40b5 (diff) |
whois port hack thingy; rperkins@tcsg.net
Diffstat (limited to 'usr.bin/whois')
-rw-r--r-- | usr.bin/whois/whois.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 0cdf6685f78..2e12789bd13 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -1,4 +1,4 @@ -/* $OpenBSD: whois.c,v 1.28 2003/09/18 22:16:15 fgsch Exp $ */ +/* $OpenBSD: whois.c,v 1.29 2003/10/04 03:18:38 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)whois.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: whois.c,v 1.28 2003/09/18 22:16:15 fgsch Exp $"; +static const char rcsid[] = "$OpenBSD: whois.c,v 1.29 2003/10/04 03:18:38 deraadt Exp $"; #endif #endif /* not lint */ @@ -176,7 +176,10 @@ whois(const char *query, const char *server, const char *port, int flags) hints.ai_socktype = SOCK_STREAM; error = getaddrinfo(server, port, &hints, &res); if (error) { - warnx("%s: %s", server, gai_strerror(error)); + if (error == EAI_SERVICE) + warnx("%s: bad port", port); + else + warnx("%s: %s", server, gai_strerror(error)); return (1); } |