1 /* $NetBSD: quota.h,v 1.28 2011/03/25 10:25:17 bouyer Exp $ */
4 * Copyright (c) 1982, 1986, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
8 * Robert Elz at The University of Melbourne.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * @(#)quota.h 8.3 (Berkeley) 8/19/94
37 #ifndef _UFS_UFS_QUOTA_H_
38 #define _UFS_UFS_QUOTA_H_
41 * These definitions are common to the original disk quota implementation
42 * (quota1) and the newer implementation (quota2)
46 * The following constants define the usage of the quota file array in the
47 * ufsmount structure and dquot array in the inode structure. The semantics
48 * of the elements of these arrays are defined in the routine getinoquota;
49 * the remainder of the quota code treats them generically and need not be
50 * inspected when changing the size of the array.
53 #define USRQUOTA 0 /* element used for user quotas */
54 #define GRPQUOTA 1 /* element used for group quotas */
57 #if !defined(HAVE_NBTOOL_CONFIG_H)
58 #include <quota/quotaprop.h>
59 __inline
static int __unused
60 ufsclass2qtype(int class)
63 case QUOTA_CLASS_USER
:
65 case QUOTA_CLASS_GROUP
:
72 static __inline
int __unused
73 qtype2ufsclass(int type
)
77 return QUOTA_CLASS_USER
;
79 return QUOTA_CLASS_GROUP
;
84 #endif /* !defined(HAVE_NBTOOL_CONFIG_H) */
88 #include <sys/cdefs.h>
97 #endif /* !_UFS_UFS_QUOTA_H_ */