diff options
Diffstat (limited to 'xlators/nfs/server/src/nlmcbk_svc.c')
-rw-r--r-- | xlators/nfs/server/src/nlmcbk_svc.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/xlators/nfs/server/src/nlmcbk_svc.c b/xlators/nfs/server/src/nlmcbk_svc.c index 20d3728d031..badbd088f3d 100644 --- a/xlators/nfs/server/src/nlmcbk_svc.c +++ b/xlators/nfs/server/src/nlmcbk_svc.c @@ -15,6 +15,7 @@ #include "nlm4.h" #include "logging.h" +#include "nfs-messages.h" #include <stdio.h> #include <stdlib.h> #include <rpc/pmap_clnt.h> @@ -72,7 +73,8 @@ nlmcbk_program_0(struct svc_req *rqstp, register SVCXPRT *transp) } if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) { - gf_log (GF_NLM, GF_LOG_ERROR, "unable to free arguments"); + gf_msg (GF_NLM, GF_LOG_ERROR, 0, NFS_MSG_ARG_FREE_FAIL, + "unable to free arguments"); return; } return; @@ -86,31 +88,39 @@ nsm_thread (void *argv) ret = pmap_unset (NLMCBK_PROGRAM, NLMCBK_V1); if (ret == 0) { - gf_log (GF_NLM, GF_LOG_ERROR, "pmap_unset failed"); + gf_msg (GF_NLM, GF_LOG_ERROR, 0, NFS_MSG_PMAP_UNSET_FAIL, + "pmap_unset failed"); return NULL; } transp = svcudp_create(RPC_ANYSOCK); if (transp == NULL) { - gf_log (GF_NLM, GF_LOG_ERROR, "cannot create udp service."); + gf_msg (GF_NLM, GF_LOG_ERROR, errno, NFS_MSG_UDP_SERV_FAIL, + "cannot create udp service."); return NULL; } if (!svc_register(transp, NLMCBK_PROGRAM, NLMCBK_V1, nlmcbk_program_0, IPPROTO_UDP)) { - gf_log (GF_NLM, GF_LOG_ERROR, "unable to register (NLMCBK_PROGRAM, NLMCBK_V0, udp)."); + gf_msg (GF_NLM, GF_LOG_ERROR, 0, NFS_MSG_REG_NLMCBK_FAIL, + "unable to register (NLMCBK_PROGRAM, " + "NLMCBK_V0, udp)."); return NULL; } transp = svctcp_create(RPC_ANYSOCK, 0, 0); if (transp == NULL) { - gf_log (GF_NLM, GF_LOG_ERROR, "cannot create tcp service."); + gf_msg (GF_NLM, GF_LOG_ERROR, errno, NFS_MSG_TCP_SERV_FAIL, + "cannot create tcp service."); return NULL; } if (!svc_register(transp, NLMCBK_PROGRAM, NLMCBK_V1, nlmcbk_program_0, IPPROTO_TCP)) { - gf_log (GF_NLM, GF_LOG_ERROR, "unable to register (NLMCBK_PROGRAM, NLMCBK_V0, tcp)."); + gf_msg (GF_NLM, GF_LOG_ERROR, 0, NFS_MSG_REG_NLMCBK_FAIL, + "unable to register (NLMCBK_PROGRAM, " + "NLMCBK_V0, tcp)."); return NULL; } svc_run (); - gf_log (GF_NLM, GF_LOG_ERROR, "svc_run returned"); + gf_msg (GF_NLM, GF_LOG_ERROR, 0, NFS_MSG_SVC_RUN_RETURNED, + "svc_run returned"); return NULL; /* NOTREACHED */ } |