GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: lib/librpcsvc/rquota.c Lines: 0 104 0.0 %
Date: 2017-11-13 Branches: 0 82 0.0 %

Line Branch Exec Source
1
/*
2
 * Please do not edit this file.
3
 * It was generated using rpcgen.
4
 */
5
6
#include "rquota.h"
7
8
bool_t
9
xdr_getquota_args(XDR *xdrs, getquota_args *objp)
10
{
11
12
13
	if (!xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN))
14
		return (FALSE);
15
	if (!xdr_int(xdrs, &objp->gqa_uid))
16
		return (FALSE);
17
	return (TRUE);
18
}
19
20
bool_t
21
xdr_rquota(XDR *xdrs, rquota *objp)
22
{
23
24
	int32_t *buf;
25
26
	if (xdrs->x_op == XDR_ENCODE) {
27
		buf = (int32_t *)XDR_INLINE(xdrs,
28
		    10 * BYTES_PER_XDR_UNIT);
29
		if (buf == NULL) {
30
			if (!xdr_int(xdrs, &objp->rq_bsize))
31
				return (FALSE);
32
			if (!xdr_bool(xdrs, &objp->rq_active))
33
				return (FALSE);
34
			if (!xdr_u_int(xdrs, &objp->rq_bhardlimit))
35
				return (FALSE);
36
			if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit))
37
				return (FALSE);
38
			if (!xdr_u_int(xdrs, &objp->rq_curblocks))
39
				return (FALSE);
40
			if (!xdr_u_int(xdrs, &objp->rq_fhardlimit))
41
				return (FALSE);
42
			if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit))
43
				return (FALSE);
44
			if (!xdr_u_int(xdrs, &objp->rq_curfiles))
45
				return (FALSE);
46
			if (!xdr_u_int(xdrs, &objp->rq_btimeleft))
47
				return (FALSE);
48
			if (!xdr_u_int(xdrs, &objp->rq_ftimeleft))
49
				return (FALSE);
50
		} else {
51
			IXDR_PUT_LONG(buf, objp->rq_bsize);
52
			IXDR_PUT_BOOL(buf, objp->rq_active);
53
			IXDR_PUT_U_LONG(buf, objp->rq_bhardlimit);
54
			IXDR_PUT_U_LONG(buf, objp->rq_bsoftlimit);
55
			IXDR_PUT_U_LONG(buf, objp->rq_curblocks);
56
			IXDR_PUT_U_LONG(buf, objp->rq_fhardlimit);
57
			IXDR_PUT_U_LONG(buf, objp->rq_fsoftlimit);
58
			IXDR_PUT_U_LONG(buf, objp->rq_curfiles);
59
			IXDR_PUT_U_LONG(buf, objp->rq_btimeleft);
60
			IXDR_PUT_U_LONG(buf, objp->rq_ftimeleft);
61
		}
62
		return (TRUE);
63
	} else if (xdrs->x_op == XDR_DECODE) {
64
		buf = (int32_t *)XDR_INLINE(xdrs,
65
		    10 * BYTES_PER_XDR_UNIT);
66
		if (buf == NULL) {
67
			if (!xdr_int(xdrs, &objp->rq_bsize))
68
				return (FALSE);
69
			if (!xdr_bool(xdrs, &objp->rq_active))
70
				return (FALSE);
71
			if (!xdr_u_int(xdrs, &objp->rq_bhardlimit))
72
				return (FALSE);
73
			if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit))
74
				return (FALSE);
75
			if (!xdr_u_int(xdrs, &objp->rq_curblocks))
76
				return (FALSE);
77
			if (!xdr_u_int(xdrs, &objp->rq_fhardlimit))
78
				return (FALSE);
79
			if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit))
80
				return (FALSE);
81
			if (!xdr_u_int(xdrs, &objp->rq_curfiles))
82
				return (FALSE);
83
			if (!xdr_u_int(xdrs, &objp->rq_btimeleft))
84
				return (FALSE);
85
			if (!xdr_u_int(xdrs, &objp->rq_ftimeleft))
86
				return (FALSE);
87
		} else {
88
			objp->rq_bsize = IXDR_GET_LONG(buf);
89
			objp->rq_active = IXDR_GET_BOOL(buf);
90
			objp->rq_bhardlimit = IXDR_GET_U_LONG(buf);
91
			objp->rq_bsoftlimit = IXDR_GET_U_LONG(buf);
92
			objp->rq_curblocks = IXDR_GET_U_LONG(buf);
93
			objp->rq_fhardlimit = IXDR_GET_U_LONG(buf);
94
			objp->rq_fsoftlimit = IXDR_GET_U_LONG(buf);
95
			objp->rq_curfiles = IXDR_GET_U_LONG(buf);
96
			objp->rq_btimeleft = IXDR_GET_U_LONG(buf);
97
			objp->rq_ftimeleft = IXDR_GET_U_LONG(buf);
98
		}
99
		return (TRUE);
100
	}
101
102
	if (!xdr_int(xdrs, &objp->rq_bsize))
103
		return (FALSE);
104
	if (!xdr_bool(xdrs, &objp->rq_active))
105
		return (FALSE);
106
	if (!xdr_u_int(xdrs, &objp->rq_bhardlimit))
107
		return (FALSE);
108
	if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit))
109
		return (FALSE);
110
	if (!xdr_u_int(xdrs, &objp->rq_curblocks))
111
		return (FALSE);
112
	if (!xdr_u_int(xdrs, &objp->rq_fhardlimit))
113
		return (FALSE);
114
	if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit))
115
		return (FALSE);
116
	if (!xdr_u_int(xdrs, &objp->rq_curfiles))
117
		return (FALSE);
118
	if (!xdr_u_int(xdrs, &objp->rq_btimeleft))
119
		return (FALSE);
120
	if (!xdr_u_int(xdrs, &objp->rq_ftimeleft))
121
		return (FALSE);
122
	return (TRUE);
123
}
124
125
bool_t
126
xdr_gqr_status(XDR *xdrs, gqr_status *objp)
127
{
128
129
	if (!xdr_enum(xdrs, (enum_t *)objp))
130
		return (FALSE);
131
	return (TRUE);
132
}
133
134
bool_t
135
xdr_getquota_rslt(XDR *xdrs, getquota_rslt *objp)
136
{
137
138
	if (!xdr_gqr_status(xdrs, &objp->status))
139
		return (FALSE);
140
	switch (objp->status) {
141
	case Q_OK:
142
		if (!xdr_rquota(xdrs, &objp->getquota_rslt_u.gqr_rquota))
143
			return (FALSE);
144
		break;
145
	case Q_NOQUOTA:
146
		break;
147
	case Q_EPERM:
148
		break;
149
	default:
150
		return (FALSE);
151
	}
152
	return (TRUE);
153
}