blob: d304eccb5c402537b4fcd599858c95791b8d163e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{# SPDX-License-Identifier: GPL-2.0 #}
{% if annotate %}
/* Decode {{ result }} results */
{% endif %}
static int {{ program }}_xdr_dec_{{ result }}(struct rpc_rqst *req,
struct xdr_stream *xdr, void *data)
{
{% if result == 'void' %}
xdrgen_decode_void(xdr);
{% else %}
struct {{ result }} *result = data;
if (!xdrgen_decode_{{ result }}(xdr, result))
return -EIO;
if (result->stat != nfs_ok) {
trace_nfs_xdr_status(xdr, (int)result->stat);
return {{ program }}_stat_to_errno(result->stat);
}
{% endif %}
return 0;
}
|