summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-09-26 13:26:23 -0400
committerSteve Dickson <steved@redhat.com>2008-09-26 13:26:23 -0400
commit7e76a0509947d9b906f25cf762b0aac1a3281809 (patch)
tree0d7aefd9895a96c6d9fc65f91109342ab057c8bf
parent69620a042d1151871a31f07ccd210b2dab49c628 (diff)
downloadnfs-utils-7e76a0509947d9b906f25cf762b0aac1a3281809.tar.gz
nfs-utils-7e76a0509947d9b906f25cf762b0aac1a3281809.tar.xz
nfs-utils-7e76a0509947d9b906f25cf762b0aac1a3281809.zip
nfs-utils: remove unused function rpc_logcall()
Clean up: Eliminate rpc_logcall(), which has no callers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--support/include/rpcmisc.h1
-rw-r--r--support/nfs/rpcmisc.c60
2 files changed, 0 insertions, 61 deletions
diff --git a/support/include/rpcmisc.h b/support/include/rpcmisc.h
index a2b2b5a..665df8e 100644
--- a/support/include/rpcmisc.h
+++ b/support/include/rpcmisc.h
@@ -50,7 +50,6 @@ void rpc_svcrun(void);
void rpc_dispatch(struct svc_req *rq, SVCXPRT *xprt,
struct rpc_dtable *dtable, int nvers,
void *argp, void *resp);
-void rpc_logcall(struct svc_req *, char *xname, char *args);
extern int _rpcpmstart;
extern int _rpcfdtype;
diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c
index fcc6433..bd1a2db 100644
--- a/support/nfs/rpcmisc.c
+++ b/support/nfs/rpcmisc.c
@@ -215,63 +215,3 @@ int makesock(int port, int proto)
}
return (s);
}
-
-
-/* Log an incoming call. */
-void
-rpc_logcall(struct svc_req *rqstp, char *xname, char *arg)
-{
- char buff[1024];
- int buflen=sizeof(buff);
- int len;
- char *sp;
- int i;
-
- if (!xlog_enabled(D_CALL))
- return;
-
- sp = buff;
- switch (rqstp->rq_cred.oa_flavor) {
- case AUTH_NULL:
- sprintf(sp, "NULL");
- break;
- case AUTH_UNIX: {
- struct authunix_parms *unix_cred;
- time_t time;
- struct tm *tm;
-
- unix_cred = (struct authunix_parms *) rqstp->rq_clntcred;
- time = unix_cred->aup_time;
- tm = localtime(&time);
- snprintf(sp, buflen, "UNIX %d/%d/%d %02d:%02d:%02d %s %d.%d",
- tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec,
- unix_cred->aup_machname,
- unix_cred->aup_uid,
- unix_cred->aup_gid);
- sp[buflen-1] = 0;
- len = strlen(sp);
- sp += buflen;
- buflen -= len;
- if ((int) unix_cred->aup_len > 0) {
- snprintf(sp, buflen, "+%d", unix_cred->aup_gids[0]);
- sp[buflen-1] = 0;
- len = strlen(sp);
- sp += buflen;
- buflen -= len;
- for (i = 1; i < unix_cred->aup_len; i++) {
- snprintf(sp, buflen, ",%d",
- unix_cred->aup_gids[i]);
- sp[buflen-1] = 0;
- len = strlen(sp);
- sp += buflen;
- buflen -= len;
- }
- }
- }
- break;
- default:
- sprintf(sp, "CRED %d", rqstp->rq_cred.oa_flavor);
- }
- xlog(D_CALL, "%s [%s]\n\t%s\n", xname, buff, arg);
-}