@@ -309,6 +309,32 @@ nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p)
309309 return 1 ;
310310}
311311
312+ int
313+ nlm4svc_decode_reboot (struct svc_rqst * rqstp , __be32 * p )
314+ {
315+ struct xdr_stream * xdr = & rqstp -> rq_arg_stream ;
316+ struct nlm_reboot * argp = rqstp -> rq_argp ;
317+ u32 len ;
318+
319+ if (xdr_stream_decode_u32 (xdr , & len ) < 0 )
320+ return 0 ;
321+ if (len > SM_MAXSTRLEN )
322+ return 0 ;
323+ p = xdr_inline_decode (xdr , len );
324+ if (!p )
325+ return 0 ;
326+ argp -> len = len ;
327+ argp -> mon = (char * )p ;
328+ if (xdr_stream_decode_u32 (xdr , & argp -> state ) < 0 )
329+ return 0 ;
330+ p = xdr_inline_decode (xdr , SM_PRIV_SIZE );
331+ if (!p )
332+ return 0 ;
333+ memcpy (& argp -> priv .data , p , sizeof (argp -> priv .data ));
334+
335+ return 1 ;
336+ }
337+
312338int
313339nlm4svc_encode_testres (struct svc_rqst * rqstp , __be32 * p )
314340{
@@ -376,19 +402,6 @@ nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p)
376402 return xdr_argsize_check (rqstp , p );
377403}
378404
379- int
380- nlm4svc_decode_reboot (struct svc_rqst * rqstp , __be32 * p )
381- {
382- struct nlm_reboot * argp = rqstp -> rq_argp ;
383-
384- if (!(p = xdr_decode_string_inplace (p , & argp -> mon , & argp -> len , SM_MAXSTRLEN )))
385- return 0 ;
386- argp -> state = ntohl (* p ++ );
387- memcpy (& argp -> priv .data , p , sizeof (argp -> priv .data ));
388- p += XDR_QUADLEN (SM_PRIV_SIZE );
389- return xdr_argsize_check (rqstp , p );
390- }
391-
392405int
393406nlm4svc_encode_void (struct svc_rqst * rqstp , __be32 * p )
394407{
0 commit comments