s3:quota: clean up and consolidate the xfs quota checks and defines
authorBjörn Jacke <bj@sernet.de>
Fri, 7 Sep 2012 11:13:49 +0000 (13:13 +0200)
committerBjoern Jacke <bj@sernet.de>
Fri, 7 Sep 2012 13:59:46 +0000 (15:59 +0200)
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Sep  7 15:59:46 CEST 2012 on sn-devel-104

source3/configure.in
source3/lib/sysquotas.c
source3/lib/sysquotas_xfs.c

index e76e4e42c0de6105d7b4b377d96dc744cd51d91f..0bae24bead67d3d88497ed3e45809e00c97114de 100644 (file)
@@ -4576,7 +4576,7 @@ AC_CHECK_HEADERS(sys/fs/vx_quota.h)
 
 # For quotas on XFS filesystems, Linux style
 AC_CHECK_HEADERS(xfs/xqm.h,[
-           AC_DEFINE(HAVE_LINUX_XFS_QUOTAS,1,[Whether Linux xfs quota support is available])
+           AC_DEFINE(HAVE_XFS_QUOTAS,1,[Whether xfs quota support is available])
        ])
 
 # For sys/quota.h and linux/quota.h
@@ -4601,7 +4601,7 @@ AC_TRY_COMPILE([
 ],[int i = Q_XGETQUOTA;],
 samba_cv_HAVE_SYS_QUOTA_XFS=yes,samba_cv_HAVE_SYS_QUOTA_XFS=no)])
 if test "$samba_cv_HAVE_SYS_QUOTA_XFS"x = "yes"x; then
-       samba_cv_found_xfs_header=yes
+       AC_DEFINE(HAVE_XFS_QUOTAS,1,[Whether xfs quota support is available])
 fi
 fi
 
@@ -4693,9 +4693,6 @@ if test x"$samba_cv_SYSQUOTA_FOUND" = x"yes"; then
        AC_MSG_RESULT(yes)
        AC_DEFINE(WITH_QUOTAS,1,[Whether to use disk quota support])
        AC_DEFINE(HAVE_SYS_QUOTAS,1,[Whether the new lib/sysquotas.c interface can be used])
-       if test x"$samba_cv_found_xfs_header" = x"yes"; then
-          AC_DEFINE(HAVE_XFS_QUOTAS,1,[Whether xfs quota support is available])
-       fi
 else
     AC_MSG_RESULT(no)
     AC_MSG_CHECKING(whether to use the old quota support)
index 55d4730ab3d8fe5e39d2d6b0f566e8c2e549f8ec..76f66a779e0e9713e04c1f61b0e52c7653bb725f 100644 (file)
@@ -172,7 +172,7 @@ static struct {
        int (*get_quota)(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
        int (*set_quota)(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
 } sys_quota_backends[] = {
-#if defined HAVE_XFS_QUOTAS || defined HAVE_LINUX_XFS_QUOTAS
+#if defined HAVE_XFS_QUOTAS
        {"xfs", sys_get_xfs_quota,      sys_set_xfs_quota},
 #endif /* HAVE_XFS_QUOTAS */
 #ifdef HAVE_NFS_QUOTAS
index c0df85d6c9f2a6937c0141cb57f25c282b4f6986..cf77eace977ed877dcdd6bed10b048e8810d4a68 100644 (file)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_QUOTA
 
-#if defined(HAVE_SYS_QUOTAS) && (defined(HAVE_XFS_QUOTAS) || defined(HAVE_LINUX_XFS_QUOTAS))
+#if defined(HAVE_SYS_QUOTAS) && defined(HAVE_XFS_QUOTAS)
+
+#ifdef HAVE_SYS_QUOTA_H
+#include <sys/quota.h> 
+#endif
+
+/* this one should actually come from glibc: */
+/* #include "samba_linux_quota.h" */
 
-#ifdef HAVE_LINUX_XFS_QUOTAS
-#include "samba_linux_quota.h"
 #ifdef HAVE_XFS_XQM_H
 #include <xfs/xqm.h>
 #endif
 
 #define HAVE_GROUP_QUOTA
-#else /* IRIX */
-#include <sys/quota.h> 
-#endif
 
 /* on IRIX */
 #ifndef Q_XQUOTAON