From 21eff82f639a70b547c03c3438095274de03f5b3 Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Sat, 13 Oct 2001 02:04:54 +0000 Subject: [PATCH] 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. --- sbin/umount/umount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 5c9bb7bd4e7a..6148f3022315 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) {