1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_LINUX_QUOTA_
8 #define _UAPI_LINUX_QUOTA_
9 #include <linux/types.h>
10 #define __DQUOT_VERSION__ "dquot_6.6.0"
11 #define MAXQUOTAS 3
12 #define USRQUOTA 0
13 #define GRPQUOTA 1
14 #define PRJQUOTA 2
15 #define INITQFNAMES { "user", "group", "project", "undefined", \
16 };
17 #define SUBCMDMASK 0x00ff
18 #define SUBCMDSHIFT 8
19 #define QCMD(cmd,type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
20 #define Q_SYNC 0x800001
21 #define Q_QUOTAON 0x800002
22 #define Q_QUOTAOFF 0x800003
23 #define Q_GETFMT 0x800004
24 #define Q_GETINFO 0x800005
25 #define Q_SETINFO 0x800006
26 #define Q_GETQUOTA 0x800007
27 #define Q_SETQUOTA 0x800008
28 #define Q_GETNEXTQUOTA 0x800009
29 #define QFMT_VFS_OLD 1
30 #define QFMT_VFS_V0 2
31 #define QFMT_OCFS2 3
32 #define QFMT_VFS_V1 4
33 #define QFMT_SHMEM 5
34 #define QIF_DQBLKSIZE_BITS 10
35 #define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS)
36 enum {
37   QIF_BLIMITS_B = 0,
38   QIF_SPACE_B,
39   QIF_ILIMITS_B,
40   QIF_INODES_B,
41   QIF_BTIME_B,
42   QIF_ITIME_B,
43 };
44 #define QIF_BLIMITS (1 << QIF_BLIMITS_B)
45 #define QIF_SPACE (1 << QIF_SPACE_B)
46 #define QIF_ILIMITS (1 << QIF_ILIMITS_B)
47 #define QIF_INODES (1 << QIF_INODES_B)
48 #define QIF_BTIME (1 << QIF_BTIME_B)
49 #define QIF_ITIME (1 << QIF_ITIME_B)
50 #define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
51 #define QIF_USAGE (QIF_SPACE | QIF_INODES)
52 #define QIF_TIMES (QIF_BTIME | QIF_ITIME)
53 #define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
54 struct if_dqblk {
55   __u64 dqb_bhardlimit;
56   __u64 dqb_bsoftlimit;
57   __u64 dqb_curspace;
58   __u64 dqb_ihardlimit;
59   __u64 dqb_isoftlimit;
60   __u64 dqb_curinodes;
61   __u64 dqb_btime;
62   __u64 dqb_itime;
63   __u32 dqb_valid;
64 };
65 struct if_nextdqblk {
66   __u64 dqb_bhardlimit;
67   __u64 dqb_bsoftlimit;
68   __u64 dqb_curspace;
69   __u64 dqb_ihardlimit;
70   __u64 dqb_isoftlimit;
71   __u64 dqb_curinodes;
72   __u64 dqb_btime;
73   __u64 dqb_itime;
74   __u32 dqb_valid;
75   __u32 dqb_id;
76 };
77 #define IIF_BGRACE 1
78 #define IIF_IGRACE 2
79 #define IIF_FLAGS 4
80 #define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
81 enum {
82   DQF_ROOT_SQUASH_B = 0,
83   DQF_SYS_FILE_B = 16,
84   DQF_PRIVATE
85 };
86 #define DQF_ROOT_SQUASH (1 << DQF_ROOT_SQUASH_B)
87 #define DQF_SYS_FILE (1 << DQF_SYS_FILE_B)
88 struct if_dqinfo {
89   __u64 dqi_bgrace;
90   __u64 dqi_igrace;
91   __u32 dqi_flags;
92   __u32 dqi_valid;
93 };
94 #define QUOTA_NL_NOWARN 0
95 #define QUOTA_NL_IHARDWARN 1
96 #define QUOTA_NL_ISOFTLONGWARN 2
97 #define QUOTA_NL_ISOFTWARN 3
98 #define QUOTA_NL_BHARDWARN 4
99 #define QUOTA_NL_BSOFTLONGWARN 5
100 #define QUOTA_NL_BSOFTWARN 6
101 #define QUOTA_NL_IHARDBELOW 7
102 #define QUOTA_NL_ISOFTBELOW 8
103 #define QUOTA_NL_BHARDBELOW 9
104 #define QUOTA_NL_BSOFTBELOW 10
105 enum {
106   QUOTA_NL_C_UNSPEC,
107   QUOTA_NL_C_WARNING,
108   __QUOTA_NL_C_MAX,
109 };
110 #define QUOTA_NL_C_MAX (__QUOTA_NL_C_MAX - 1)
111 enum {
112   QUOTA_NL_A_UNSPEC,
113   QUOTA_NL_A_QTYPE,
114   QUOTA_NL_A_EXCESS_ID,
115   QUOTA_NL_A_WARNING,
116   QUOTA_NL_A_DEV_MAJOR,
117   QUOTA_NL_A_DEV_MINOR,
118   QUOTA_NL_A_CAUSED_ID,
119   QUOTA_NL_A_PAD,
120   __QUOTA_NL_A_MAX,
121 };
122 #define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1)
123 #endif
124