1 /* $NetBSD: ulfs_quotacommon.h,v 1.4 2013/06/08 02:04:31 dholland Exp $ */
2 /* from NetBSD: quota.h,v 1.30 2012/08/26 02:32:14 dholland Exp */
5 * Copyright (c) 1982, 1986, 1993
6 * The Regents of the University of California. All rights reserved.
8 * This code is derived from software contributed to Berkeley by
9 * Robert Elz at The University of Melbourne.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * @(#)quota.h 8.3 (Berkeley) 8/19/94
38 #ifndef _UFS_LFS_ULFS_QUOTACOMMON_H_
39 #define _UFS_LFS_ULFS_QUOTACOMMON_H_
41 #include <ufs/lfs/lfs.h>
42 #include <ufs/lfs/lfs_inode.h>
45 * These definitions are common to the original disk quota implementation
46 * (quota1) and the newer implementation (quota2)
50 * Initializer for the strings corresponding to the quota ID types.
51 * (in quota1 these are also the default names of the quota files)
53 #define INITQFNAMES { \
54 "user", /* ULFS_USRQUOTA */ \
55 "group", /* ULFS_GRPQUOTA */ \
58 #if !defined(HAVE_NBTOOL_CONFIG_H)
59 #include <sys/quota.h>
60 __inline
static int __unused
61 quota_idtype_to_ulfs(int idtype
)
64 case QUOTA_IDTYPE_USER
:
66 case QUOTA_IDTYPE_GROUP
:
73 static __inline
int __unused
74 quota_idtype_from_ulfs(int ulfstype
)
78 return QUOTA_IDTYPE_USER
;
80 return QUOTA_IDTYPE_GROUP
;
85 #endif /* !defined(HAVE_NBTOOL_CONFIG_H) */
89 #include <sys/cdefs.h>
92 void lfs_dqinit(void);
93 void lfs_dqreinit(void);
94 void lfs_dqdone(void);
98 #endif /* !_UFS_LFS_ULFS_QUOTACOMMON_H_ */