[SCM] SAMBA-CTDB repository - branch v3-4-ctdb updated - 7d0d0435315a48ecc964e2d7dfc47b68065ad90c

Michael Adam obnox at samba.org
Mon Jun 29 15:00:59 GMT 2009


The branch, v3-4-ctdb has been updated
       via  7d0d0435315a48ecc964e2d7dfc47b68065ad90c (commit)
       via  68ddc3239b6bf5bff42d187ec3fac5bd81f9784f (commit)
       via  4ea6673c3b47c9c17a5eba79069a6adb84d52352 (commit)
      from  8630a1a6dece8f2c654677e72120e76d3377fd17 (commit)

http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-4-ctdb


- Log -----------------------------------------------------------------
commit 7d0d0435315a48ecc964e2d7dfc47b68065ad90c
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 29 16:26:42 2009 +0200

    s3:fix build of old linux quota system and other unixes' quota implementation
    
    By fixing the use of struct stat_ex.
    
    Michael

commit 68ddc3239b6bf5bff42d187ec3fac5bd81f9784f
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 29 16:11:13 2009 +0200

    s3:lib/sysquotas: fix usage of SMB_STRUCT_STAT (struct stat_ex).
    
    This fixes the build with quotas / configure time detection
    of sys_quota interface.
    
    Michael

commit 4ea6673c3b47c9c17a5eba79069a6adb84d52352
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 29 15:39:46 2009 +0200

    lib/util: fix building tevent_ntstatus without config.h
    
    (when called from places with "#define NO_CONFIG_H" set, such as configure)
    
     Michael

-----------------------------------------------------------------------

Summary of changes:
 lib/util/tevent_ntstatus.h |    1 -
 source3/lib/sysquotas.c    |    6 +++---
 source3/smbd/quotas.c      |   28 ++++++++++++++--------------
 3 files changed, 17 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/tevent_ntstatus.h b/lib/util/tevent_ntstatus.h
index 84c275f..acfb903 100644
--- a/lib/util/tevent_ntstatus.h
+++ b/lib/util/tevent_ntstatus.h
@@ -22,7 +22,6 @@
 
 #include <stdint.h>
 #include <stdbool.h>
-#include "config.h"
 #include "../libcli/util/ntstatus.h"
 #include "../tevent/tevent.h"
 
diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index 5ee199d..7eed0ca 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -63,7 +63,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
 	if ( sys_stat(path, &S) == -1 )
 		return (-1);
 
-	devno = S.st_dev ;
+	devno = S.st_ex_dev ;
 
 	fp = setmntent(MOUNTED,"r");
 	if (fp == NULL) {
@@ -74,7 +74,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
 		if ( sys_stat(mnt->mnt_dir,&S) == -1 )
 			continue ;
 
-		if (S.st_dev == devno) {
+		if (S.st_ex_dev == devno) {
 			(*mntpath) = SMB_STRDUP(mnt->mnt_dir);
 			(*bdev) = SMB_STRDUP(mnt->mnt_fsname);
 			(*fs)   = SMB_STRDUP(mnt->mnt_type);
@@ -118,7 +118,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
 		return ret;
 	}
 	
-	if ((ret=devnm(S_IFBLK, S.st_dev, dev_disk, 256, 1))!=0) {
+	if ((ret=devnm(S_IFBLK, S.st_ex_dev, dev_disk, 256, 1))!=0) {
 		return ret;	
 	}
 
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index c4664e7..43b7009 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -227,7 +227,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
 	if ( sys_stat(path, &S) == -1 )
 		return(False) ;
 
-	devno = S.st_dev ;
+	devno = S.st_ex_dev ;
 
 	if ((fp = setmntent(MOUNTED,"r")) == NULL)
 		return(False) ;
@@ -238,7 +238,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
 		if ( sys_stat(mnt->mnt_dir,&S) == -1 )
 			continue ;
 
-		if (S.st_dev == devno) {
+		if (S.st_ex_dev == devno) {
 			found = True ;
 			break;
 		}
@@ -321,7 +321,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
 		return false;
 	}
 
-	devno = sbuf.st_dev ;
+	devno = sbuf.st_ex_dev ;
 
 	if ((fd = setmntent(KMTAB)) == NULL) {
 		return false;
@@ -331,7 +331,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
 		if (sys_stat(mnt->mnt_dir,&sbuf) == -1) {
 			continue;
 		}
-		if (sbuf.st_dev == devno) {
+		if (sbuf.st_ex_dev == devno) {
 			found = frue ;
 			break;
 		}
@@ -603,7 +603,7 @@ bool disk_quotas(const char *path,
 		return false;
 	}
 
-	devno = sbuf.st_dev ;
+	devno = sbuf.st_ex_dev ;
 	DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%x\n",
 		path, (unsigned int)devno));
 #if defined(SUNOS5)
@@ -620,7 +620,7 @@ bool disk_quotas(const char *path,
 			mnt.mnt_mountp, (unsigned int)devno));
 
 		/* quotas are only on vxfs, UFS or NFS */
-		if ((sbuf.st_dev == devno) && (
+		if ((sbuf.st_ex_dev == devno) && (
 			strcmp( mnt.mnt_fstype, MNTTYPE_UFS ) == 0 ||
 			strcmp( mnt.mnt_fstype, "nfs" ) == 0    ||
 			strcmp( mnt.mnt_fstype, "vxfs" ) == 0 )) {
@@ -644,8 +644,8 @@ bool disk_quotas(const char *path,
 		}
 		DEBUG(5,("disk_quotas: testing \"%s\" devno=%x\n",
 					mnt->mnt_dir,
-					(unsigned int)sbuf.st_dev));
-		if (sbuf.st_dev == devno) {
+					(unsigned int)sbuf.st_ex_dev));
+		if (sbuf.st_ex_dev == devno) {
 			found = true;
 			name = talloc_strdup(talloc_tos(),
 					mnt->mnt_fsname);
@@ -836,7 +836,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
     return(False) ;
   }
 
-  devno = S.st_dev ;
+  devno = S.st_ex_dev ;
   
   fp = setmntent(MOUNTED,"r");
   found = False ;
@@ -844,7 +844,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
   while ((mnt = getmntent(fp))) {
     if ( sys_stat(mnt->mnt_dir,&S) == -1 )
       continue ;
-    if (S.st_dev == devno) {
+    if (S.st_ex_dev == devno) {
       found = True ;
       break ;
     }
@@ -1154,9 +1154,9 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
    * to have a significant performance boost when
    * lstat calls on /dev access this function.
    */
-  if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_dev, dev_disk, 256, 1)<0))
+  if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_ex_dev, dev_disk, 256, 1)<0))
 #else
-  if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_dev, dev_disk, 256, 0)<0)) 
+  if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_ex_dev, dev_disk, 256, 0)<0))
 	return (False);
 #endif /* ifdef HPUX */
 
@@ -1185,7 +1185,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
     
     if (sys_stat(path,&st) < 0)
         return False;
-    devno = st.st_dev;
+    devno = st.st_ex_dev;
 
     mntsize = getmntinfo(&mnts,MNT_NOWAIT);
     if (mntsize <= 0)
@@ -1194,7 +1194,7 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
     for (i = 0; i < mntsize; i++) {
         if (sys_stat(mnts[i].f_mntonname,&st) < 0)
             return False;
-        if (st.st_dev == devno)
+        if (st.st_ex_dev == devno)
             break;
     }
     if (i == mntsize)


-- 
SAMBA-CTDB repository


More information about the samba-cvs mailing list