summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-10-13 02:04:54 +0000
committeriedowse <iedowse@FreeBSD.org>2001-10-13 02:04:54 +0000
commit07ef386ebd0acb1d39725f6118f77ce6f6d487eb (patch)
tree458feba4acd694b5c2e894d4f8179e100a72649d
parent1326af677031c4177427934c265993912c4a1bc2 (diff)
downloadFreeBSD-src-07ef386ebd0acb1d39725f6118f77ce6f6d487eb.zip
FreeBSD-src-07ef386ebd0acb1d39725f6118f77ce6f6d487eb.tar.gz
Oops, fix a missing condition that broke umount's `-h' option. I
had somehow removed an error check in revision 1.26, causing errx() to be called unconditionally in the -h case.
-rw-r--r--sbin/umount/umount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c
index 5c9bb7b..6148f30 100644
--- a/sbin/umount/umount.c
+++ b/sbin/umount/umount.c
@@ -140,7 +140,8 @@ main(int argc, char *argv[])
if (nfshost != NULL) {
memset(&hints, 0, sizeof hints);
error = getaddrinfo(nfshost, NULL, &hints, &nfshost_ai);
- errx(1, "%s: %s", nfshost, gai_strerror(error));
+ if (error)
+ errx(1, "%s: %s", nfshost, gai_strerror(error));
}
switch (all) {
OpenPOWER on IntegriCloud