Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _UAPI_LINUX_QUOTA_
     20 #define _UAPI_LINUX_QUOTA_
     21 #include <linux/types.h>
     22 #define __DQUOT_VERSION__ "dquot_6.6.0"
     23 #define MAXQUOTAS 3
     24 #define USRQUOTA 0
     25 #define GRPQUOTA 1
     26 #define PRJQUOTA 2
     27 #define INITQFNAMES { "user", "group", "project", "undefined", \
     28 };
     29 #define SUBCMDMASK 0x00ff
     30 #define SUBCMDSHIFT 8
     31 #define QCMD(cmd,type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
     32 #define Q_SYNC 0x800001
     33 #define Q_QUOTAON 0x800002
     34 #define Q_QUOTAOFF 0x800003
     35 #define Q_GETFMT 0x800004
     36 #define Q_GETINFO 0x800005
     37 #define Q_SETINFO 0x800006
     38 #define Q_GETQUOTA 0x800007
     39 #define Q_SETQUOTA 0x800008
     40 #define Q_GETNEXTQUOTA 0x800009
     41 #define QFMT_VFS_OLD 1
     42 #define QFMT_VFS_V0 2
     43 #define QFMT_OCFS2 3
     44 #define QFMT_VFS_V1 4
     45 #define QIF_DQBLKSIZE_BITS 10
     46 #define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS)
     47 enum {
     48   QIF_BLIMITS_B = 0,
     49   QIF_SPACE_B,
     50   QIF_ILIMITS_B,
     51   QIF_INODES_B,
     52   QIF_BTIME_B,
     53   QIF_ITIME_B,
     54 };
     55 #define QIF_BLIMITS (1 << QIF_BLIMITS_B)
     56 #define QIF_SPACE (1 << QIF_SPACE_B)
     57 #define QIF_ILIMITS (1 << QIF_ILIMITS_B)
     58 #define QIF_INODES (1 << QIF_INODES_B)
     59 #define QIF_BTIME (1 << QIF_BTIME_B)
     60 #define QIF_ITIME (1 << QIF_ITIME_B)
     61 #define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
     62 #define QIF_USAGE (QIF_SPACE | QIF_INODES)
     63 #define QIF_TIMES (QIF_BTIME | QIF_ITIME)
     64 #define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
     65 struct if_dqblk {
     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 };
     76 struct if_nextdqblk {
     77   __u64 dqb_bhardlimit;
     78   __u64 dqb_bsoftlimit;
     79   __u64 dqb_curspace;
     80   __u64 dqb_ihardlimit;
     81   __u64 dqb_isoftlimit;
     82   __u64 dqb_curinodes;
     83   __u64 dqb_btime;
     84   __u64 dqb_itime;
     85   __u32 dqb_valid;
     86   __u32 dqb_id;
     87 };
     88 #define IIF_BGRACE 1
     89 #define IIF_IGRACE 2
     90 #define IIF_FLAGS 4
     91 #define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
     92 enum {
     93   DQF_ROOT_SQUASH_B = 0,
     94   DQF_SYS_FILE_B = 16,
     95   DQF_PRIVATE
     96 };
     97 #define DQF_ROOT_SQUASH (1 << DQF_ROOT_SQUASH_B)
     98 #define DQF_SYS_FILE (1 << DQF_SYS_FILE_B)
     99 struct if_dqinfo {
    100   __u64 dqi_bgrace;
    101   __u64 dqi_igrace;
    102   __u32 dqi_flags;
    103   __u32 dqi_valid;
    104 };
    105 #define QUOTA_NL_NOWARN 0
    106 #define QUOTA_NL_IHARDWARN 1
    107 #define QUOTA_NL_ISOFTLONGWARN 2
    108 #define QUOTA_NL_ISOFTWARN 3
    109 #define QUOTA_NL_BHARDWARN 4
    110 #define QUOTA_NL_BSOFTLONGWARN 5
    111 #define QUOTA_NL_BSOFTWARN 6
    112 #define QUOTA_NL_IHARDBELOW 7
    113 #define QUOTA_NL_ISOFTBELOW 8
    114 #define QUOTA_NL_BHARDBELOW 9
    115 #define QUOTA_NL_BSOFTBELOW 10
    116 enum {
    117   QUOTA_NL_C_UNSPEC,
    118   QUOTA_NL_C_WARNING,
    119   __QUOTA_NL_C_MAX,
    120 };
    121 #define QUOTA_NL_C_MAX (__QUOTA_NL_C_MAX - 1)
    122 enum {
    123   QUOTA_NL_A_UNSPEC,
    124   QUOTA_NL_A_QTYPE,
    125   QUOTA_NL_A_EXCESS_ID,
    126   QUOTA_NL_A_WARNING,
    127   QUOTA_NL_A_DEV_MAJOR,
    128   QUOTA_NL_A_DEV_MINOR,
    129   QUOTA_NL_A_CAUSED_ID,
    130   QUOTA_NL_A_PAD,
    131   __QUOTA_NL_A_MAX,
    132 };
    133 #define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1)
    134 #endif
    135