aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/pmap_clnt.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-01-31 12:14:08 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-02-03 18:35:10 -0500
commit46121cf7d85869bfe9588bac7ccf55aa0bc7f278 (patch)
tree51172f1b47dd8aa99e6f96c495fe7f8e2c0bbc34 /net/sunrpc/pmap_clnt.c
parent8885cb367f86ce02bed3bf18192d74a53ac3b81f (diff)
SUNRPC: fix print format for tk_pid
The tk_pid field is an unsigned short. The proper print format specifier for that type is %5u, not %4d. Also clean up some miscellaneous print formatting nits. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/pmap_clnt.c')
-rw-r--r--net/sunrpc/pmap_clnt.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c
index 76e59e9b8fb8..12ab4ec5fc79 100644
--- a/net/sunrpc/pmap_clnt.c
+++ b/net/sunrpc/pmap_clnt.c
@@ -97,7 +97,7 @@ void rpc_getport(struct rpc_task *task)
97 struct rpc_task *child; 97 struct rpc_task *child;
98 int status; 98 int status;
99 99
100 dprintk("RPC: %4d rpc_getport(%s, %u, %u, %d)\n", 100 dprintk("RPC: %5u rpc_getport(%s, %u, %u, %d)\n",
101 task->tk_pid, clnt->cl_server, 101 task->tk_pid, clnt->cl_server,
102 clnt->cl_prog, clnt->cl_vers, xprt->prot); 102 clnt->cl_prog, clnt->cl_vers, xprt->prot);
103 103
@@ -178,7 +178,7 @@ int rpc_getport_external(struct sockaddr_in *sin, __u32 prog, __u32 vers, int pr
178 char hostname[32]; 178 char hostname[32];
179 int status; 179 int status;
180 180
181 dprintk("RPC: rpc_getport_external(%u.%u.%u.%u, %u, %u, %d)\n", 181 dprintk("RPC: rpc_getport_external(%u.%u.%u.%u, %u, %u, %d)\n",
182 NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot); 182 NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot);
183 183
184 sprintf(hostname, "%u.%u.%u.%u", NIPQUAD(sin->sin_addr.s_addr)); 184 sprintf(hostname, "%u.%u.%u.%u", NIPQUAD(sin->sin_addr.s_addr));
@@ -221,7 +221,7 @@ static void pmap_getport_done(struct rpc_task *child, void *data)
221 status = 0; 221 status = 0;
222 } 222 }
223 223
224 dprintk("RPC: %4d pmap_getport_done(status %d, port %u)\n", 224 dprintk("RPC: %5u pmap_getport_done(status %d, port %u)\n",
225 child->tk_pid, status, map->pm_port); 225 child->tk_pid, status, map->pm_port);
226 226
227 pmap_wake_portmap_waiters(xprt, status); 227 pmap_wake_portmap_waiters(xprt, status);
@@ -257,13 +257,14 @@ int rpc_register(u32 prog, u32 vers, int prot, unsigned short port, int *okay)
257 struct rpc_clnt *pmap_clnt; 257 struct rpc_clnt *pmap_clnt;
258 int error = 0; 258 int error = 0;
259 259
260 dprintk("RPC: registering (%u, %u, %d, %u) with portmapper.\n", 260 dprintk("RPC: registering (%u, %u, %d, %u) with portmapper.\n",
261 prog, vers, prot, port); 261 prog, vers, prot, port);
262 262
263 pmap_clnt = pmap_create("localhost", &sin, IPPROTO_UDP, 1); 263 pmap_clnt = pmap_create("localhost", &sin, IPPROTO_UDP, 1);
264 if (IS_ERR(pmap_clnt)) { 264 if (IS_ERR(pmap_clnt)) {
265 error = PTR_ERR(pmap_clnt); 265 error = PTR_ERR(pmap_clnt);
266 dprintk("RPC: couldn't create pmap client. Error = %d\n", error); 266 dprintk("RPC: couldn't create pmap client. Error = %d\n",
267 error);
267 return error; 268 return error;
268 } 269 }
269 270
@@ -274,7 +275,7 @@ int rpc_register(u32 prog, u32 vers, int prot, unsigned short port, int *okay)
274 "RPC: failed to contact portmap (errno %d).\n", 275 "RPC: failed to contact portmap (errno %d).\n",
275 error); 276 error);
276 } 277 }
277 dprintk("RPC: registration status %d/%d\n", error, *okay); 278 dprintk("RPC: registration status %d/%d\n", error, *okay);
278 279
279 /* Client deleted automatically because cl_oneshot == 1 */ 280 /* Client deleted automatically because cl_oneshot == 1 */
280 return error; 281 return error;
@@ -305,8 +306,9 @@ static struct rpc_clnt *pmap_create(char *hostname, struct sockaddr_in *srvaddr,
305 */ 306 */
306static int xdr_encode_mapping(struct rpc_rqst *req, __be32 *p, struct portmap_args *map) 307static int xdr_encode_mapping(struct rpc_rqst *req, __be32 *p, struct portmap_args *map)
307{ 308{
308 dprintk("RPC: xdr_encode_mapping(%u, %u, %u, %u)\n", 309 dprintk("RPC: xdr_encode_mapping(%u, %u, %u, %u)\n",
309 map->pm_prog, map->pm_vers, map->pm_prot, map->pm_port); 310 map->pm_prog, map->pm_vers,
311 map->pm_prot, map->pm_port);
310 *p++ = htonl(map->pm_prog); 312 *p++ = htonl(map->pm_prog);
311 *p++ = htonl(map->pm_vers); 313 *p++ = htonl(map->pm_vers);
312 *p++ = htonl(map->pm_prot); 314 *p++ = htonl(map->pm_prot);