1{# SPDX-License-Identifier: GPL-2.0 #} 2 3/** 4 * {{ program }}_svc_encode_{{ result }} - Encode a {{ result }} result 5 * @rqstp: RPC transaction context 6 * @xdr: target XDR data stream 7 * 8 * Return values: 9 * %true: procedure results encoded successfully 10 * %false: encode failed 11 */ 12bool {{ program }}_svc_encode_{{ result }}(struct svc_rqst *rqstp, struct xdr_stream *xdr) 13{ 14{% if result in structs %} 15 struct {{ result }} *resp = rqstp->rq_resp; 16 17 return xdrgen_encode_{{ result }}(xdr, resp); 18{% else %} 19 {{ result }} *resp = rqstp->rq_resp; 20 21 return xdrgen_encode_{{ result }}(xdr, *resp); 22{% endif %} 23} 24