The Samba-Bugzilla – Attachment 7353 Details for
Bug 8777
Add sys_statvfs() wrapper support for OpenBSD/FreeBSD/DragonFly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
sys_statvfs() wrapper support for OpenBSD/FreeBSD/DragonFly try #2
samba_statvfs2.diff (text/plain), 2.92 KB, created by
Brad Smith
on 2012-03-01 06:56:59 UTC
(
hide
)
Description:
sys_statvfs() wrapper support for OpenBSD/FreeBSD/DragonFly try #2
Filename:
MIME Type:
Creator:
Brad Smith
Created:
2012-03-01 06:56:59 UTC
Size:
2.92 KB
patch
obsolete
>diff --git a/source3/configure.in b/source3/configure.in >index dc47f13..94098bb 100644 >--- a/source3/configure.in >+++ b/source3/configure.in >@@ -6834,25 +6834,48 @@ fi > > CFLAGS=$CFLAGS_SAVE > >-# Checks for the vfs_fileid module >+# Checks for *BSD bsd_statvfs() function > # Start >-AC_CHECK_FUNC(getmntent) >- >-AC_CHECK_HEADERS(sys/param.h sys/statfs.h sys/mount.h) >+AC_CHECK_HEADERS(sys/param.h sys/mount.h) > >-AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid)]) >-AC_CACHE_VAL(vfsfileid_cv_statfs,[ >+AC_MSG_CHECKING([bsd_statvfs: checking for statfs() and struct statfs.bsize]) >+AC_CACHE_VAL(bsdstatvfs_cv_statfs,[ > AC_TRY_RUN([ >- #include <sys/types.h> > #ifdef HAVE_SYS_PARAM_H > #include <sys/param.h> > #endif > #ifdef HAVE_SYS_MOUNT_H > #include <sys/mount.h> > #endif >- #ifdef HAVE_SYS_STATFS_H >+ int main (void) >+ { >+ struct statfs fsd; >+ fsd.f_bsize = 0; >+ exit (statfs (".", &fsd)); >+ }], >+ bsdstatvfs_cv_statfs=yes, >+ bsdstatvfs_cv_statfs=no, >+ bsdstatvfs_cv_statfs=no)]) >+AC_MSG_RESULT($bsdstatvfs_cv_statfs) >+ >+if test $bsdstatvfs_cv_statfs = yes; then >+ AC_DEFINE(BSD_STATVFS_BSIZE,1,[Whether statfs exists and struct statfs has bsize property]) >+fi >+ >+# End >+# Checks for *BSD sys_statvfs() function >+ >+# Checks for the vfs_fileid module >+# Start >+AC_CHECK_FUNC(getmntent) >+ >+AC_CHECK_HEADERS(sys/statfs.h) >+ >+AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid]) >+AC_CACHE_VAL(vfsfileid_cv_statfs,[ >+ AC_TRY_RUN([ >+ #include <sys/types.h> > #include <sys/statfs.h> >- #endif > int main(void) > { > struct statfs fsd; >diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c >index d81adad..fd0ff0a 100644 >--- a/source3/modules/vfs_default.c >+++ b/source3/modules/vfs_default.c >@@ -111,7 +111,7 @@ static uint32_t vfswrap_fs_capabilities(struct vfs_handle_struct *handle, > NTSTATUS status; > int ret = -1; > >-#if defined(DARWINOS) || (defined(BSD) && defined(MNT_RDONLY)) >+#if defined(DARWINOS) || (defined(BSD) && defined(BSD_STATVFS_BSIZE)) > struct vfs_statvfs_struct statbuf; > ZERO_STRUCT(statbuf); > sys_statvfs(conn->connectpath, &statbuf); >diff --git a/source3/smbd/statvfs.c b/source3/smbd/statvfs.c >index e6e1572..18a560a 100644 >--- a/source3/smbd/statvfs.c >+++ b/source3/smbd/statvfs.c >@@ -123,7 +123,7 @@ static int darwin_statvfs(const char *path, vfs_statvfs_struct *statbuf) > > return 0; > } >-#elif defined(BSD) && defined(MNT_RDONLY) >+#elif defined(BSD) && defined(BSD_STATVFS_BSIZE) > static int bsd_statvfs(const char *path, vfs_statvfs_struct *statbuf) > { > struct statfs statfs_buf; >@@ -174,7 +174,7 @@ int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf) > return linux_statvfs(path, statbuf); > #elif defined(DARWINOS) > return darwin_statvfs(path, statbuf); >-#elif defined(BSD) && defined(MNT_RDONLY) >+#elif defined(BSD) && defined(BSD_STATVFS_BSIZE) > return bsd_statvfs(path, statbuf); > #else > /* BB change this to return invalid level */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8777
:
7343
|
7344
| 7353 |
7375
|
7376