diff options
Diffstat (limited to 'fs/lockd/xdr.c')
-rw-r--r-- | fs/lockd/xdr.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 0eb694dc497b..964666c68a86 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c | |||
@@ -341,32 +341,3 @@ nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) | |||
341 | { | 341 | { |
342 | return xdr_ressize_check(rqstp, p); | 342 | return xdr_ressize_check(rqstp, p); |
343 | } | 343 | } |
344 | |||
345 | #ifdef RPC_DEBUG | ||
346 | const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie) | ||
347 | { | ||
348 | /* | ||
349 | * We can get away with a static buffer because we're only | ||
350 | * called with BKL held. | ||
351 | */ | ||
352 | static char buf[2*NLM_MAXCOOKIELEN+1]; | ||
353 | unsigned int i, len = sizeof(buf); | ||
354 | char *p = buf; | ||
355 | |||
356 | len--; /* allow for trailing \0 */ | ||
357 | if (len < 3) | ||
358 | return "???"; | ||
359 | for (i = 0 ; i < cookie->len ; i++) { | ||
360 | if (len < 2) { | ||
361 | strcpy(p-3, "..."); | ||
362 | break; | ||
363 | } | ||
364 | sprintf(p, "%02x", cookie->data[i]); | ||
365 | p += 2; | ||
366 | len -= 2; | ||
367 | } | ||
368 | *p = '\0'; | ||
369 | |||
370 | return buf; | ||
371 | } | ||
372 | #endif | ||