]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - quota/quota.h
2 * Copyright (c) 2005 Silicon Graphics, Inc.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 * Different forms of XFS quota
28 XFS_BLOCK_QUOTA
= 0x1,
29 XFS_INODE_QUOTA
= 0x2,
30 XFS_RTBLOCK_QUOTA
= 0x4,
34 * System call definitions mapping to platform-specific quotactl
36 extern int xfsquotactl(int __cmd
, const char *__device
,
37 uint __type
, uint __id
, void * __addr
);
39 XFS_QUOTAON
, /* enable accounting/enforcement */
40 XFS_QUOTAOFF
, /* disable accounting/enforcement */
41 XFS_GETQUOTA
, /* get disk limits and usage */
42 XFS_SETQLIM
, /* set disk limits */
43 XFS_GETQSTAT
, /* get quota subsystem status */
44 XFS_QUOTARM
, /* free disk space used by dquots */
45 XFS_QSYNC
, /* flush delayed allocate space */
46 XFS_GETQSTATV
, /* newer version of quota stats */
47 XFS_GETNEXTQUOTA
, /* get disk limits and usage */
53 extern char *type_to_string(uint __type
);
54 extern char *form_to_string(uint __form
);
55 extern char *time_to_string(time_t __time
, uint __flags
);
56 extern char *bbs_to_string(uint64_t __v
, char *__c
, uint __size
);
57 extern char *num_to_string(uint64_t __v
, char *__c
, uint __size
);
58 extern char *pct_to_string(uint64_t __v
, uint64_t __t
, char *__c
, uint __s
);
60 extern FILE *fopen_write_secure(char *__filename
);
63 * Various utility routine flags
66 NO_HEADER_FLAG
= 0x0001, /* don't print header */
67 VERBOSE_FLAG
= 0x0002, /* increase verbosity */
68 HUMAN_FLAG
= 0x0004, /* human-readable values */
69 QUOTA_FLAG
= 0x0008, /* uid/gid/prid over-quota (soft) */
70 LIMIT_FLAG
= 0x0010, /* uid/gid/prid over-limit (hard) */
71 ALL_MOUNTS_FLAG
= 0x0020, /* iterate over every mounted xfs */
72 TERSE_FLAG
= 0x0040, /* decrease verbosity */
73 HISTOGRAM_FLAG
= 0x0080, /* histogram format output */
74 DEFAULTS_FLAG
= 0x0100, /* use value as a default */
75 ABSOLUTE_FLAG
= 0x0200, /* absolute time, not related to now */
76 NO_LOOKUP_FLAG
= 0x0400, /* skip name lookups, just report ID */
77 GETNEXTQUOTA_FLAG
= 0x0800, /* use getnextquota quotactl */
81 * Identifier (uid/gid/prid) cache routines
84 extern char *uid_to_name(uint32_t __uid
);
85 extern char *gid_to_name(uint32_t __gid
);
86 extern char *prid_to_name(uint32_t __prid
);
87 extern bool isdigits_only(const char *);