2 * $Id: rquota_xdr.c,v 1.3 2001-06-29 14:14:46 rufustfirefly 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 static int _xdr_rquota_dummy;
21 /* list of machines that don't have these functions:
25 #if defined(NEED_RQUOTA) || (defined(sun) && defined(__svr4__)) || \
26 (defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 6)
29 #include <rpcsvc/rquota.h>
32 xdr_getquota_args(xdrs, objp)
36 if (!xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN)) {
39 if (!xdr_int(xdrs, &objp->gqa_uid)) {
47 xdr_rquota(xdrs, objp)
51 if (!xdr_int(xdrs, &objp->rq_bsize)) {
54 if (!xdr_bool(xdrs, &objp->rq_active)) {
57 if (!xdr_u_int(xdrs, &objp->rq_bhardlimit)) {
60 if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit)) {
63 if (!xdr_u_int(xdrs, &objp->rq_curblocks)) {
66 if (!xdr_u_int(xdrs, &objp->rq_fhardlimit)) {
69 if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit)) {
72 if (!xdr_u_int(xdrs, &objp->rq_curfiles)) {
75 if (!xdr_u_int(xdrs, &objp->rq_btimeleft)) {
78 if (!xdr_u_int(xdrs, &objp->rq_ftimeleft)) {
88 xdr_gqr_status(xdrs, objp)
92 if (!xdr_enum(xdrs, (enum_t *)objp)) {
100 xdr_getquota_rslt(xdrs, objp)
104 if (!xdr_gqr_status(xdrs, &objp->status)) {
107 switch (objp->status) {
109 if (!xdr_rquota(xdrs, &objp->getquota_rslt_u.gqr_rquota)) {