2 Unix SMB/CIFS implementation.
3 SYS QUOTA code constants
4 Copyright (C) Stefan (metze) Metzmacher 2003
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifdef HAVE_SYS_QUOTAS
25 #if defined(HAVE_MNTENT_H)&&defined(HAVE_SETMNTENT)&&defined(HAVE_GETMNTENT)&&defined(HAVE_ENDMNTENT)
28 /*#endif defined(HAVE_MNTENT_H)&&defined(HAVE_SETMNTENT)&&defined(HAVE_GETMNTENT)&&defined(HAVE_ENDMNTENT) */
29 #elif defined(HAVE_DEVNM_H)&&defined(HAVE_DEVNM)
31 #endif /* defined(HAVE_DEVNM_H)&&defined(HAVE_DEVNM) */
33 #endif /* HAVE_SYS_QUOTAS */
36 /**************************************************
37 Some stuff for the sys_quota api.
38 **************************************************/
40 #define SMB_QUOTAS_NO_LIMIT ((SMB_BIG_UINT)(0))
41 #define SMB_QUOTAS_NO_SPACE ((SMB_BIG_UINT)(1))
43 #define SMB_QUOTAS_SET_NO_LIMIT(dp) \
45 (dp)->softlimit = SMB_QUOTAS_NO_LIMIT;\
46 (dp)->hardlimit = SMB_QUOTAS_NO_LIMIT;\
47 (dp)->isoftlimit = SMB_QUOTAS_NO_LIMIT;\
48 (dp)->ihardlimit = SMB_QUOTAS_NO_LIMIT;\
51 #define SMB_QUOTAS_SET_NO_SPACE(dp) \
53 (dp)->softlimit = SMB_QUOTAS_NO_SPACE;\
54 (dp)->hardlimit = SMB_QUOTAS_NO_SPACE;\
55 (dp)->isoftlimit = SMB_QUOTAS_NO_SPACE;\
56 (dp)->ihardlimit = SMB_QUOTAS_NO_SPACE;\
59 typedef struct _SMB_DISK_QUOTA
{
60 enum SMB_QUOTA_TYPE qtype
;
62 SMB_BIG_UINT hardlimit
; /* In bsize units. */
63 SMB_BIG_UINT softlimit
; /* In bsize units. */
64 SMB_BIG_UINT curblocks
; /* In bsize units. */
65 SMB_BIG_UINT ihardlimit
; /* inode hard limit. */
66 SMB_BIG_UINT isoftlimit
; /* inode soft limit. */
67 SMB_BIG_UINT curinodes
; /* Current used inodes. */
71 #ifndef QUOTABLOCK_SIZE
72 #define QUOTABLOCK_SIZE 1024
75 #endif /*_SYSQUOTAS_H */