2 Copyright (c) 2014, Ronnie Sahlberg
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 1. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 The views and conclusions contained in the software and documentation are those
26 of the authors and should not be interpreted as representing official policies,
27 either expressed or implied, of the FreeBSD Project.
31 * Please do not edit this file.
32 * It was generated using rpcgen.
35 #include "libnfs-zdr.h"
36 #include "libnfs-raw-rquota.h"
39 zdr_rquotastat (ZDR
*zdrs
, rquotastat
*objp
)
41 register int32_t *buf
;
44 if (!zdr_enum (zdrs
, (enum_t
*) objp
))
50 zdr_exportpath (ZDR
*zdrs
, exportpath
*objp
)
52 register int32_t *buf
;
55 if (!zdr_string (zdrs
, objp
, RQUOTAPATHLEN
))
61 zdr_GETQUOTA1args (ZDR
*zdrs
, GETQUOTA1args
*objp
)
63 register int32_t *buf
;
66 if (!zdr_exportpath (zdrs
, &objp
->export
))
68 if (!zdr_int (zdrs
, &objp
->uid
))
74 zdr_quotatype (ZDR
*zdrs
, quotatype
*objp
)
76 register int32_t *buf
;
79 if (!zdr_enum (zdrs
, (enum_t
*) objp
))
85 zdr_GETQUOTA2args (ZDR
*zdrs
, GETQUOTA2args
*objp
)
87 register int32_t *buf
;
90 if (!zdr_exportpath (zdrs
, &objp
->export
))
92 if (!zdr_quotatype (zdrs
, &objp
->type
))
94 if (!zdr_int (zdrs
, &objp
->uid
))
100 zdr_GETQUOTA1res_ok (ZDR
*zdrs
, GETQUOTA1res_ok
*objp
)
102 register int32_t *buf
;
106 if (zdrs
->x_op
== ZDR_ENCODE
) {
107 buf
= ZDR_INLINE (zdrs
, 10 * BYTES_PER_ZDR_UNIT
);
109 if (!zdr_int (zdrs
, &objp
->bsize
))
111 if (!zdr_int (zdrs
, &objp
->active
))
113 if (!zdr_int (zdrs
, &objp
->bhardlimit
))
115 if (!zdr_int (zdrs
, &objp
->bsoftlimit
))
117 if (!zdr_int (zdrs
, &objp
->curblocks
))
119 if (!zdr_int (zdrs
, &objp
->fhardlimit
))
121 if (!zdr_int (zdrs
, &objp
->fsoftlimit
))
123 if (!zdr_int (zdrs
, &objp
->curfiles
))
125 if (!zdr_int (zdrs
, &objp
->btimeleft
))
127 if (!zdr_int (zdrs
, &objp
->ftimeleft
))
130 IZDR_PUT_LONG(buf
, objp
->bsize
);
131 IZDR_PUT_LONG(buf
, objp
->active
);
132 IZDR_PUT_LONG(buf
, objp
->bhardlimit
);
133 IZDR_PUT_LONG(buf
, objp
->bsoftlimit
);
134 IZDR_PUT_LONG(buf
, objp
->curblocks
);
135 IZDR_PUT_LONG(buf
, objp
->fhardlimit
);
136 IZDR_PUT_LONG(buf
, objp
->fsoftlimit
);
137 IZDR_PUT_LONG(buf
, objp
->curfiles
);
138 IZDR_PUT_LONG(buf
, objp
->btimeleft
);
139 IZDR_PUT_LONG(buf
, objp
->ftimeleft
);
142 } else if (zdrs
->x_op
== ZDR_DECODE
) {
143 buf
= ZDR_INLINE (zdrs
, 10 * BYTES_PER_ZDR_UNIT
);
145 if (!zdr_int (zdrs
, &objp
->bsize
))
147 if (!zdr_int (zdrs
, &objp
->active
))
149 if (!zdr_int (zdrs
, &objp
->bhardlimit
))
151 if (!zdr_int (zdrs
, &objp
->bsoftlimit
))
153 if (!zdr_int (zdrs
, &objp
->curblocks
))
155 if (!zdr_int (zdrs
, &objp
->fhardlimit
))
157 if (!zdr_int (zdrs
, &objp
->fsoftlimit
))
159 if (!zdr_int (zdrs
, &objp
->curfiles
))
161 if (!zdr_int (zdrs
, &objp
->btimeleft
))
163 if (!zdr_int (zdrs
, &objp
->ftimeleft
))
166 objp
->bsize
= IZDR_GET_LONG(buf
);
167 objp
->active
= IZDR_GET_LONG(buf
);
168 objp
->bhardlimit
= IZDR_GET_LONG(buf
);
169 objp
->bsoftlimit
= IZDR_GET_LONG(buf
);
170 objp
->curblocks
= IZDR_GET_LONG(buf
);
171 objp
->fhardlimit
= IZDR_GET_LONG(buf
);
172 objp
->fsoftlimit
= IZDR_GET_LONG(buf
);
173 objp
->curfiles
= IZDR_GET_LONG(buf
);
174 objp
->btimeleft
= IZDR_GET_LONG(buf
);
175 objp
->ftimeleft
= IZDR_GET_LONG(buf
);
180 if (!zdr_int (zdrs
, &objp
->bsize
))
182 if (!zdr_int (zdrs
, &objp
->active
))
184 if (!zdr_int (zdrs
, &objp
->bhardlimit
))
186 if (!zdr_int (zdrs
, &objp
->bsoftlimit
))
188 if (!zdr_int (zdrs
, &objp
->curblocks
))
190 if (!zdr_int (zdrs
, &objp
->fhardlimit
))
192 if (!zdr_int (zdrs
, &objp
->fsoftlimit
))
194 if (!zdr_int (zdrs
, &objp
->curfiles
))
196 if (!zdr_int (zdrs
, &objp
->btimeleft
))
198 if (!zdr_int (zdrs
, &objp
->ftimeleft
))
204 zdr_GETQUOTA1res (ZDR
*zdrs
, GETQUOTA1res
*objp
)
206 register int32_t *buf
;
209 if (!zdr_rquotastat (zdrs
, &objp
->status
))
211 switch (objp
->status
) {
213 if (!zdr_GETQUOTA1res_ok (zdrs
, &objp
->GETQUOTA1res_u
.quota
))