2 * $Id: rquota_xdr.c,v 1.4 2003-02-17 01:51:08 srittau Exp $
4 * taken from the quota-1.55 used on linux. here's the bsd copyright:
6 * Copyright (c) 1980, 1990 Regents of the University of California. All
9 * This code is derived from software contributed to Berkeley by Robert Elz at
10 * The University of Melbourne.
15 #endif /* HAVE_CONFIG_H */
17 #include <stdio.h> /* to get __GNU_LIBRARY__ */
19 /* list of machines that don't have these functions:
23 #if defined(NEED_RQUOTA) || (defined(sun) && defined(__svr4__)) || \
24 (defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 6)
27 #include <rpcsvc/rquota.h>
30 xdr_getquota_args(xdrs, objp)
34 if (!xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN)) {
37 if (!xdr_int(xdrs, &objp->gqa_uid)) {
45 xdr_rquota(xdrs, objp)
49 if (!xdr_int(xdrs, &objp->rq_bsize)) {
52 if (!xdr_bool(xdrs, &objp->rq_active)) {
55 if (!xdr_u_int(xdrs, &objp->rq_bhardlimit)) {
58 if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit)) {
61 if (!xdr_u_int(xdrs, &objp->rq_curblocks)) {
64 if (!xdr_u_int(xdrs, &objp->rq_fhardlimit)) {
67 if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit)) {
70 if (!xdr_u_int(xdrs, &objp->rq_curfiles)) {
73 if (!xdr_u_int(xdrs, &objp->rq_btimeleft)) {
76 if (!xdr_u_int(xdrs, &objp->rq_ftimeleft)) {
86 xdr_gqr_status(xdrs, objp)
90 if (!xdr_enum(xdrs, (enum_t *)objp)) {
98 xdr_getquota_rslt(xdrs, objp)
102 if (!xdr_gqr_status(xdrs, &objp->status)) {
105 switch (objp->status) {
107 if (!xdr_rquota(xdrs, &objp->getquota_rslt_u.gqr_rquota)) {