File: solaris_2.h

package info (click to toggle)
libquota-perl 1.6.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 368 kB
  • sloc: ansic: 947; perl: 788; sh: 48; makefile: 9
file content (56 lines) | stat: -rw-r--r-- 1,258 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 *   Configuration for Solaris 2.4 & 2.5.x & 2.6 - NOT 2.7
 *   (this is for use with SYSV flavour, not /usr/bsd)
 *
 *   For AFS support look at the end of this file
 */

/*   See hints/none.h for a complete list of options with explanations */

#include <sys/param.h>
#include <sys/fs/ufs_quota.h>
#include <sys/mnttab.h>

#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpcsvc/rquota.h>
#include <sys/socket.h>
#include <netdb.h>

#include <stdio.h>
#include <string.h>

#define USE_IOCTL
#define Q_DIV(X) ((X) / 2)
#define Q_MUL(X) ((X) * 2)
#define DEV_QBSIZE DEV_BSIZE
#define CADR (caddr_t)

/* Haven't found definition of quotactl-struct in any include,
   just mentioned in man quotactl(7) */
struct quotactl {
  int op;
  uid_t uid;
  caddr_t addr;
};

#define NO_OPEN_MNTTAB
#define MOUNTED MNTTAB
#define MNTENT mnttab

/*
 *   Solaris seems to lack xdr routines for rquota. Use my own.
 */
#define MY_XDR

#define GQR_STATUS status
#define GQR_RQUOTA getquota_rslt_u.gqr_rquota

#define QS_BHARD dqb_bhardlimit
#define QS_BSOFT dqb_bsoftlimit
#define QS_BCUR  dqb_curblocks
#define QS_FHARD dqb_fhardlimit
#define QS_FSOFT dqb_fsoftlimit
#define QS_FCUR  dqb_curfiles
#define QS_BTIME dqb_btimelimit
#define QS_FTIME dqb_ftimelimit