summaryrefslogtreecommitdiffstats
path: root/support/export/hostname.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-11-05 14:03:53 -0500
committerSteve Dickson <steved@redhat.com>2013-11-05 14:03:53 -0500
commitd4a408776d611cd62235232d65d488d02fca78e4 (patch)
tree47e2d232cad7f277746e1e1cdbf66a1bf75fb5af /support/export/hostname.c
parentda88f28656da305ed319867211753baac32c4242 (diff)
downloadnfs-utils-d4a408776d611cd62235232d65d488d02fca78e4.tar.gz
nfs-utils-d4a408776d611cd62235232d65d488d02fca78e4.tar.xz
nfs-utils-d4a408776d611cd62235232d65d488d02fca78e4.zip
exportfs: exit with error code if there was any error (take 2).
exportfs currently exits with a non-zero error for some errors, but not for others. It does this by having various support routines set the global variable "export_errno". Change this to have 'xlog' set export_errno if an ERROR is reported. That way all errors will be caught. Note that the exit error code is changed from 22 (EINVAL) to the more traditional '1'. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/export/hostname.c')
-rw-r--r--support/export/hostname.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/support/export/hostname.c b/support/export/hostname.c
index e53d692..3e949a1 100644
--- a/support/export/hostname.c
+++ b/support/export/hostname.c
@@ -175,12 +175,10 @@ host_addrinfo(const char *hostname)
case 0:
return ai;
case EAI_SYSTEM:
- export_errno = errno;
xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m",
__func__, hostname, errno);
break;
default:
- export_errno = EINVAL;
xlog(D_GENERAL, "%s: failed to resolve %s: %s",
__func__, hostname, gai_strerror(error));
break;