summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2010-01-15 13:51:04 -0500
committerSteve Dickson <steved@redhat.com>2010-01-15 14:55:52 -0500
commitfb69c9d6320b303acbb7971da9e8f18d32b33e2f (patch)
treed4b86270db7fe5bf8bff5067b1626243d5828588
parentec8a23e674ba39b3c4048095c4d848dfb1b15c0f (diff)
downloadnfs-utils-fb69c9d6320b303acbb7971da9e8f18d32b33e2f.tar.gz
Tone down a number xlog messages in svc_create_bindaddr()nfs-utils-1-2-2-rc7
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--support/nfs/svc_create.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c
index fa7eab6..59ba505 100644
--- a/support/nfs/svc_create.c
+++ b/support/nfs/svc_create.c
@@ -72,7 +72,7 @@ svc_create_bindaddr(struct netconfig *nconf, const uint16_t port)
hint.ai_family = AF_INET6;
#endif /* IPV6_SUPPORTED */
else {
- xlog(L_ERROR, "Unrecognized bind address family: %s",
+ xlog(D_GENERAL, "Unrecognized bind address family: %s",
nconf->nc_protofmly);
return NULL;
}
@@ -82,26 +82,20 @@ svc_create_bindaddr(struct netconfig *nconf, const uint16_t port)
else if (strcmp(nconf->nc_proto, NC_TCP) == 0)
hint.ai_protocol = (int)IPPROTO_TCP;
else {
- xlog(L_ERROR, "Unrecognized bind address protocol: %s",
+ xlog(D_GENERAL, "Unrecognized bind address protocol: %s",
nconf->nc_proto);
return NULL;
}
(void)snprintf(buf, sizeof(buf), "%u", port);
error = getaddrinfo(NULL, buf, &hint, &ai);
- switch (error != 0) {
- case 0:
- return ai;
- case EAI_SYSTEM:
- xlog(L_ERROR, "Failed to construct bind address: %m");
- break;
- default:
+ if (error != 0) {
xlog(L_ERROR, "Failed to construct bind address: %s",
gai_strerror(error));
- break;
+ return NULL;
}
- return NULL;
+ return ai;
}
static unsigned int