Merge tag 'upstream/1.9.3'
[deb_libnfs.git] / rquota / libnfs-raw-rquota.c
1 /*
2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 */
5
6 #include "libnfs-zdr.h"
7 #include "libnfs-raw-rquota.h"
8
9 bool_t
10 zdr_rquotastat (ZDR *zdrs, rquotastat *objp)
11 {
12 register int32_t *buf;
13 buf = NULL;
14
15 if (!zdr_enum (zdrs, (enum_t *) objp))
16 return FALSE;
17 return TRUE;
18 }
19
20 bool_t
21 zdr_exportpath (ZDR *zdrs, exportpath *objp)
22 {
23 register int32_t *buf;
24 buf = NULL;
25
26 if (!zdr_string (zdrs, objp, RQUOTAPATHLEN))
27 return FALSE;
28 return TRUE;
29 }
30
31 bool_t
32 zdr_GETQUOTA1args (ZDR *zdrs, GETQUOTA1args *objp)
33 {
34 register int32_t *buf;
35 buf = NULL;
36
37 if (!zdr_exportpath (zdrs, &objp->export))
38 return FALSE;
39 if (!zdr_int (zdrs, &objp->uid))
40 return FALSE;
41 return TRUE;
42 }
43
44 bool_t
45 zdr_quotatype (ZDR *zdrs, quotatype *objp)
46 {
47 register int32_t *buf;
48 buf = NULL;
49
50 if (!zdr_enum (zdrs, (enum_t *) objp))
51 return FALSE;
52 return TRUE;
53 }
54
55 bool_t
56 zdr_GETQUOTA2args (ZDR *zdrs, GETQUOTA2args *objp)
57 {
58 register int32_t *buf;
59 buf = NULL;
60
61 if (!zdr_exportpath (zdrs, &objp->export))
62 return FALSE;
63 if (!zdr_quotatype (zdrs, &objp->type))
64 return FALSE;
65 if (!zdr_int (zdrs, &objp->uid))
66 return FALSE;
67 return TRUE;
68 }
69
70 bool_t
71 zdr_GETQUOTA1res_ok (ZDR *zdrs, GETQUOTA1res_ok *objp)
72 {
73 register int32_t *buf;
74 buf = NULL;
75
76
77 if (zdrs->x_op == ZDR_ENCODE) {
78 buf = ZDR_INLINE (zdrs, 10 * BYTES_PER_ZDR_UNIT);
79 if (buf == NULL) {
80 if (!zdr_int (zdrs, &objp->bsize))
81 return FALSE;
82 if (!zdr_int (zdrs, &objp->active))
83 return FALSE;
84 if (!zdr_int (zdrs, &objp->bhardlimit))
85 return FALSE;
86 if (!zdr_int (zdrs, &objp->bsoftlimit))
87 return FALSE;
88 if (!zdr_int (zdrs, &objp->curblocks))
89 return FALSE;
90 if (!zdr_int (zdrs, &objp->fhardlimit))
91 return FALSE;
92 if (!zdr_int (zdrs, &objp->fsoftlimit))
93 return FALSE;
94 if (!zdr_int (zdrs, &objp->curfiles))
95 return FALSE;
96 if (!zdr_int (zdrs, &objp->btimeleft))
97 return FALSE;
98 if (!zdr_int (zdrs, &objp->ftimeleft))
99 return FALSE;
100 } else {
101 IZDR_PUT_LONG(buf, objp->bsize);
102 IZDR_PUT_LONG(buf, objp->active);
103 IZDR_PUT_LONG(buf, objp->bhardlimit);
104 IZDR_PUT_LONG(buf, objp->bsoftlimit);
105 IZDR_PUT_LONG(buf, objp->curblocks);
106 IZDR_PUT_LONG(buf, objp->fhardlimit);
107 IZDR_PUT_LONG(buf, objp->fsoftlimit);
108 IZDR_PUT_LONG(buf, objp->curfiles);
109 IZDR_PUT_LONG(buf, objp->btimeleft);
110 IZDR_PUT_LONG(buf, objp->ftimeleft);
111 }
112 return TRUE;
113 } else if (zdrs->x_op == ZDR_DECODE) {
114 buf = ZDR_INLINE (zdrs, 10 * BYTES_PER_ZDR_UNIT);
115 if (buf == NULL) {
116 if (!zdr_int (zdrs, &objp->bsize))
117 return FALSE;
118 if (!zdr_int (zdrs, &objp->active))
119 return FALSE;
120 if (!zdr_int (zdrs, &objp->bhardlimit))
121 return FALSE;
122 if (!zdr_int (zdrs, &objp->bsoftlimit))
123 return FALSE;
124 if (!zdr_int (zdrs, &objp->curblocks))
125 return FALSE;
126 if (!zdr_int (zdrs, &objp->fhardlimit))
127 return FALSE;
128 if (!zdr_int (zdrs, &objp->fsoftlimit))
129 return FALSE;
130 if (!zdr_int (zdrs, &objp->curfiles))
131 return FALSE;
132 if (!zdr_int (zdrs, &objp->btimeleft))
133 return FALSE;
134 if (!zdr_int (zdrs, &objp->ftimeleft))
135 return FALSE;
136 } else {
137 objp->bsize = IZDR_GET_LONG(buf);
138 objp->active = IZDR_GET_LONG(buf);
139 objp->bhardlimit = IZDR_GET_LONG(buf);
140 objp->bsoftlimit = IZDR_GET_LONG(buf);
141 objp->curblocks = IZDR_GET_LONG(buf);
142 objp->fhardlimit = IZDR_GET_LONG(buf);
143 objp->fsoftlimit = IZDR_GET_LONG(buf);
144 objp->curfiles = IZDR_GET_LONG(buf);
145 objp->btimeleft = IZDR_GET_LONG(buf);
146 objp->ftimeleft = IZDR_GET_LONG(buf);
147 }
148 return TRUE;
149 }
150
151 if (!zdr_int (zdrs, &objp->bsize))
152 return FALSE;
153 if (!zdr_int (zdrs, &objp->active))
154 return FALSE;
155 if (!zdr_int (zdrs, &objp->bhardlimit))
156 return FALSE;
157 if (!zdr_int (zdrs, &objp->bsoftlimit))
158 return FALSE;
159 if (!zdr_int (zdrs, &objp->curblocks))
160 return FALSE;
161 if (!zdr_int (zdrs, &objp->fhardlimit))
162 return FALSE;
163 if (!zdr_int (zdrs, &objp->fsoftlimit))
164 return FALSE;
165 if (!zdr_int (zdrs, &objp->curfiles))
166 return FALSE;
167 if (!zdr_int (zdrs, &objp->btimeleft))
168 return FALSE;
169 if (!zdr_int (zdrs, &objp->ftimeleft))
170 return FALSE;
171 return TRUE;
172 }
173
174 bool_t
175 zdr_GETQUOTA1res (ZDR *zdrs, GETQUOTA1res *objp)
176 {
177 register int32_t *buf;
178 buf = NULL;
179
180 if (!zdr_rquotastat (zdrs, &objp->status))
181 return FALSE;
182 switch (objp->status) {
183 case RQUOTA_OK:
184 if (!zdr_GETQUOTA1res_ok (zdrs, &objp->GETQUOTA1res_u.quota))
185 return FALSE;
186 break;
187 default:
188 break;
189 }
190 return TRUE;
191 }