From a6ed782c1a57c99361ead322caaed8e294ed64d0 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Sun, 9 Aug 2009 15:09:42 -0400 Subject: [PATCH] --- yaml --- r: 158551 b: refs/heads/master c: 7ed0ff983c8ad30bf4e2b9fdbb299a3e3ec08d08 h: refs/heads/master i: 158549: 7baf7895e5bece77384fc73cd37877bb66c007ac 158547: b14814747c187f6a69d97f98caec7a44e2c01171 158543: 545fa5d45f5ff05f482bc84e9beaa067f98d3572 v: v3 --- [refs] | 2 +- trunk/net/sunrpc/rpcb_clnt.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a582e18595c7..41a0d5161689 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0d36c4f7574d5a33bedd8f0e3c793490d45d83c6 +refs/heads/master: 7ed0ff983c8ad30bf4e2b9fdbb299a3e3ec08d08 diff --git a/trunk/net/sunrpc/rpcb_clnt.c b/trunk/net/sunrpc/rpcb_clnt.c index e0d7b31e54a7..fe183af5cc72 100644 --- a/trunk/net/sunrpc/rpcb_clnt.c +++ b/trunk/net/sunrpc/rpcb_clnt.c @@ -736,6 +736,28 @@ static int rpcb_decode_set(struct rpc_rqst *req, __be32 *p, return 0; } +static int rpcb_dec_set(struct rpc_rqst *req, __be32 *p, + unsigned int *boolp) +{ + struct rpc_task *task = req->rq_task; + struct xdr_stream xdr; + + xdr_init_decode(&xdr, &req->rq_rcv_buf, p); + + p = xdr_inline_decode(&xdr, sizeof(__be32)); + if (unlikely(p == NULL)) + return -EIO; + + *boolp = 0; + if (*p) + *boolp = 1; + + dprintk("RPC: %5u RPCB_%s call %s\n", + task->tk_pid, task->tk_msg.rpc_proc->p_name, + (*boolp ? "succeeded" : "failed")); + return 0; +} + static int encode_rpcb_string(struct xdr_stream *xdr, const char *string, const u32 maxstrlen) {