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 #define u_int unsigned
31 #include <rpcsvc/rquota.h>
34 xdr_getquota_args(xdrs, objp)
38 if (!xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN)) {
41 if (!xdr_int(xdrs, &objp->gqa_uid)) {
49 xdr_rquota(xdrs, objp)
53 if (!xdr_int(xdrs, &objp->rq_bsize)) {
56 if (!xdr_bool(xdrs, &objp->rq_active)) {
59 if (!xdr_u_int(xdrs, &objp->rq_bhardlimit)) {
62 if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit)) {
65 if (!xdr_u_int(xdrs, &objp->rq_curblocks)) {
68 if (!xdr_u_int(xdrs, &objp->rq_fhardlimit)) {
71 if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit)) {
74 if (!xdr_u_int(xdrs, &objp->rq_curfiles)) {
77 if (!xdr_u_int(xdrs, &objp->rq_btimeleft)) {
80 if (!xdr_u_int(xdrs, &objp->rq_ftimeleft)) {
90 xdr_gqr_status(xdrs, objp)
94 if (!xdr_enum(xdrs, (enum_t *)objp)) {
102 xdr_getquota_rslt(xdrs, objp)
106 if (!xdr_gqr_status(xdrs, &objp->status)) {
109 switch (objp->status) {
111 if (!xdr_rquota(xdrs, &objp->getquota_rslt_u.gqr_rquota)) {