source: trunk/athena/bin/quota/rcquotaxdr.c @ 7994

Revision 7994, 1.3 KB checked in by cfields, 29 years ago (diff)
Don't include ufs/quota.h anywhere.
Line 
1#include <stdio.h>
2#include <sys/types.h>
3#include <sys/param.h>
4#if defined(_AIX)
5#include <sys/select.h>
6#endif
7#include <rpc/rpc.h>
8#include <rpcsvc/rcquota.h>
9
10bool_t
11xdr_getcquota_args(xdrs, gq_argsp)
12        XDR *xdrs;
13        struct getcquota_args *gq_argsp;
14{
15        extern bool_t xdr_path();
16
17        return (xdr_path(xdrs, &gq_argsp->gqa_pathp) &&
18            xdr_int(xdrs, &gq_argsp->gqa_uid));
19}
20
21
22bool_t
23xdr_getcquota_rslt(xdrs, gq_rsltp)
24        XDR *xdrs;
25        struct getcquota_rslt *gq_rsltp;
26{
27  int i;
28  if (xdr_enum(xdrs, &gq_rsltp->gqr_status) &&
29      xdr_bool(xdrs, &gq_rsltp->rq_group) &&
30      xdr_int(xdrs, &gq_rsltp->rq_ngrps) &&
31      xdr_int(xdrs, &gq_rsltp->rq_bsize) &&
32      xdr_rcquota(xdrs, &gq_rsltp->gqr_zm))
33    {
34      for(i=0;i<NGROUPS+1;i++)
35        if (!xdr_rcquota(xdrs, &gq_rsltp->gqr_rcquota[i]))
36          break;
37      if (i!=NGROUPS+1) return(FALSE);
38      return(TRUE);
39    }
40  else return(FALSE);
41}
42
43bool_t
44xdr_rcquota(xdrs, rqp)
45        XDR *xdrs;
46        struct rcquota *rqp;
47{
48
49  return (xdr_int(xdrs, &rqp->rq_id) &&
50          xdr_u_long(xdrs, &rqp->rq_bhardlimit) &&
51          xdr_u_long(xdrs, &rqp->rq_bsoftlimit) &&
52          xdr_u_long(xdrs, &rqp->rq_curblocks) &&
53          xdr_u_long(xdrs, &rqp->rq_fhardlimit) &&
54          xdr_u_long(xdrs, &rqp->rq_fsoftlimit) &&
55          xdr_u_long(xdrs, &rqp->rq_curfiles) &&
56          xdr_u_long(xdrs, &rqp->rq_btimeleft) &&
57          xdr_u_long(xdrs, &rqp->rq_ftimeleft) );
58}
Note: See TracBrowser for help on using the repository browser.