00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _SYSQUOTAS_H
00022 #define _SYSQUOTAS_H
00023
00024 #ifdef HAVE_SYS_QUOTAS
00025
00026 #if defined(HAVE_MNTENT_H)&&defined(HAVE_SETMNTENT)&&defined(HAVE_GETMNTENT)&&defined(HAVE_ENDMNTENT)
00027 #include <mntent.h>
00028 #define HAVE_MNTENT 1
00029
00030 #elif defined(HAVE_DEVNM_H)&&defined(HAVE_DEVNM)
00031 #include <devnm.h>
00032 #endif
00033
00034 #endif
00035
00036
00037
00038
00039
00040
00041 #define SMB_QUOTAS_NO_LIMIT ((SMB_BIG_UINT)(0))
00042 #define SMB_QUOTAS_NO_SPACE ((SMB_BIG_UINT)(1))
00043
00044 #define SMB_QUOTAS_SET_NO_LIMIT(dp) \
00045 {\
00046 (dp)->softlimit = SMB_QUOTAS_NO_LIMIT;\
00047 (dp)->hardlimit = SMB_QUOTAS_NO_LIMIT;\
00048 (dp)->isoftlimit = SMB_QUOTAS_NO_LIMIT;\
00049 (dp)->ihardlimit = SMB_QUOTAS_NO_LIMIT;\
00050 }
00051
00052 #define SMB_QUOTAS_SET_NO_SPACE(dp) \
00053 {\
00054 (dp)->softlimit = SMB_QUOTAS_NO_SPACE;\
00055 (dp)->hardlimit = SMB_QUOTAS_NO_SPACE;\
00056 (dp)->isoftlimit = SMB_QUOTAS_NO_SPACE;\
00057 (dp)->ihardlimit = SMB_QUOTAS_NO_SPACE;\
00058 }
00059
00060 typedef struct _SMB_DISK_QUOTA {
00061 enum SMB_QUOTA_TYPE qtype;
00062 SMB_BIG_UINT bsize;
00063 SMB_BIG_UINT hardlimit;
00064 SMB_BIG_UINT softlimit;
00065 SMB_BIG_UINT curblocks;
00066 SMB_BIG_UINT ihardlimit;
00067 SMB_BIG_UINT isoftlimit;
00068 SMB_BIG_UINT curinodes;
00069 uint32 qflags;
00070 } SMB_DISK_QUOTA;
00071
00072 #ifndef QUOTABLOCK_SIZE
00073 #define QUOTABLOCK_SIZE 1024
00074 #endif
00075
00076 #endif