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
21
#include <xfs/project.h>
24
* Different forms of XFS quota
27
XFS_BLOCK_QUOTA = 0x1,
28
XFS_INODE_QUOTA = 0x2,
29
XFS_RTBLOCK_QUOTA = 0x4,
33
* System call definitions mapping to platform-specific quotactl
35
extern int xfsquotactl(int __cmd, const char *__device,
36
uint __type, uint __id, void * __addr);
38
XFS_QUOTAON, /* enable accounting/enforcement */
39
XFS_QUOTAOFF, /* disable accounting/enforcement */
40
XFS_GETQUOTA, /* get disk limits and usage */
41
XFS_SETQLIM, /* set disk limits */
42
XFS_GETQSTAT, /* get quota subsystem status */
43
XFS_QUOTARM, /* free disk space used by dquots */
44
XFS_QSYNC, /* flush delayed allocate space */
50
extern char *type_to_string(uint __type);
51
extern char *form_to_string(uint __form);
52
extern char *time_to_string(__uint32_t __time, uint __flags);
53
extern char *bbs_to_string(__uint64_t __v, char *__c, uint __size);
54
extern char *num_to_string(__uint64_t __v, char *__c, uint __size);
55
extern char *pct_to_string(__uint64_t __v, __uint64_t __t, char *__c, uint __s);
57
extern FILE *fopen_write_secure(char *__filename);
60
* Various utility routine flags
63
NO_HEADER_FLAG = 0x0001, /* don't print header */
64
VERBOSE_FLAG = 0x0002, /* increase verbosity */
65
HUMAN_FLAG = 0x0004, /* human-readable values */
66
QUOTA_FLAG = 0x0008, /* uid/gid/prid over-quota (soft) */
67
LIMIT_FLAG = 0x0010, /* uid/gid/prid over-limit (hard) */
68
ALL_MOUNTS_FLAG = 0x0020, /* iterate over every mounted xfs */
69
TERSE_FLAG = 0x0040, /* decrease verbosity */
70
HISTOGRAM_FLAG = 0x0080, /* histogram format output */
71
DEFAULTS_FLAG = 0x0100, /* use value as a default */
72
ABSOLUTE_FLAG = 0x0200, /* absolute time, not related to now */
73
NO_LOOKUP_FLAG = 0x0400, /* skip name lookups, just report ID */
77
* Identifier (uid/gid/prid) cache routines
80
extern char *uid_to_name(__uint32_t __uid);
81
extern char *gid_to_name(__uint32_t __gid);
82
extern char *prid_to_name(__uint32_t __prid);