include/sysquotas.h

説明を見る。
00001 /* 
00002     Unix SMB/CIFS implementation.
00003     SYS QUOTA code constants
00004     Copyright (C) Stefan (metze) Metzmacher     2003
00005     
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010     
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015     
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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 /*#endif defined(HAVE_MNTENT_H)&&defined(HAVE_SETMNTENT)&&defined(HAVE_GETMNTENT)&&defined(HAVE_ENDMNTENT) */
00030 #elif defined(HAVE_DEVNM_H)&&defined(HAVE_DEVNM)
00031 #include <devnm.h>
00032 #endif /* defined(HAVE_DEVNM_H)&&defined(HAVE_DEVNM) */
00033 
00034 #endif /* HAVE_SYS_QUOTAS */
00035 
00036 
00037 /**************************************************
00038  Some stuff for the sys_quota api.
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; /* In bsize units. */
00064         SMB_BIG_UINT softlimit; /* In bsize units. */
00065         SMB_BIG_UINT curblocks; /* In bsize units. */
00066         SMB_BIG_UINT ihardlimit; /* inode hard limit. */
00067         SMB_BIG_UINT isoftlimit; /* inode soft limit. */
00068         SMB_BIG_UINT curinodes; /* Current used inodes. */
00069         uint32       qflags;
00070 } SMB_DISK_QUOTA;
00071 
00072 #ifndef QUOTABLOCK_SIZE
00073 #define QUOTABLOCK_SIZE 1024
00074 #endif
00075 
00076 #endif /*_SYSQUOTAS_H */

Sambaに対してSat Aug 29 21:22:57 2009に生成されました。  doxygen 1.4.7