[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha6-908-g2b097cb
Derrell Lipman
derrell at samba.org
Sat Feb 14 21:01:34 GMT 2009
The branch, master has been updated
via 2b097cbb4e83291ffaea0c8904891f031caba898 (commit)
from b222de4eb3abab618f740a89279af2a7dc0985a7 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2b097cbb4e83291ffaea0c8904891f031caba898
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date: Sat Feb 14 16:00:51 2009 -0500
It seems some systems use f_flags instead of f_flag. Use the appropriate one.
-----------------------------------------------------------------------
Summary of changes:
source3/configure.in | 17 +++++++++++++++++
source3/libsmb/libsmb_stat.c | 15 +++++++++++----
2 files changed, 28 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/configure.in b/source3/configure.in
index 97f3511..4a8d594 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4789,6 +4789,23 @@ if test x"$samba_cv_frsize" = x"yes"; then
AC_DEFINE(HAVE_FRSIZE, 1, [Whether statvfs.f_frsize exists])
fi
+# Some systems use f_flag in struct statvfs while others use f_flags
+AC_CACHE_CHECK([that statvfs.statvfs_f_flag works],samba_cv_statvfs_f_flag, [
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/statvfs.h>],[struct statvfs buf; buf.f_flag = 0],
+ samba_cv_statvfs_f_flag=yes,samba_cv_statvfs_f_flag=no)])
+if test x"$samba_cv_statvfs_f_flag" = x"yes"; then
+ AC_DEFINE(HAVE_STATVFS_F_FLAG, 1, [Whether statvfs.f_flag exists])
+fi
+
+AC_CACHE_CHECK([that statvfs.statvfs_f_flags works],samba_cv_statvfs_f_flags, [
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/statvfs.h>],[struct statvfs buf; buf.f_flags = 0],
+ samba_cv_statvfs_f_flags=yes,samba_cv_statvfs_f_flags=no)])
+if test x"$samba_cv_statvfs_f_flags" = x"yes"; then
+ AC_DEFINE(HAVE_STATVFS_F_FLAGS, 1, [Whether statvfs.f_flags exists])
+fi
+
if test $space = no; then
# DEC Alpha running OSF/1
AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c
index 8987c2e..8a950b6 100644
--- a/source3/libsmb/libsmb_stat.c
+++ b/source3/libsmb/libsmb_stat.c
@@ -363,6 +363,7 @@ SMBC_fstatvfs_ctx(SMBCCTX *context,
SMBCFILE *file,
struct statvfs *st)
{
+ unsigned long flags = 0;
uint32 fs_attrs = 0;
struct cli_state *cli = file->srv->cli;
@@ -410,7 +411,7 @@ SMBC_fstatvfs_ctx(SMBCCTX *context,
(fsblkcnt_t) actual_allocation_units;
}
- st->f_flag |= SMBC_VFS_FEATURE_NO_UNIXCIFS;
+ flags |= SMBC_VFS_FEATURE_NO_UNIXCIFS;
} else {
uint32 optimal_transfer_size;
uint32 block_size;
@@ -464,18 +465,24 @@ SMBC_fstatvfs_ctx(SMBCCTX *context,
* user-specified case sensitivity setting.
*/
if (! smbc_getOptionCaseSensitive(context)) {
- st->f_flag |= SMBC_VFS_FEATURE_CASE_INSENSITIVE;
+ flags |= SMBC_VFS_FEATURE_CASE_INSENSITIVE;
}
} else {
if (! (fs_attrs & FILE_CASE_SENSITIVE_SEARCH)) {
- st->f_flag |= SMBC_VFS_FEATURE_CASE_INSENSITIVE;
+ flags |= SMBC_VFS_FEATURE_CASE_INSENSITIVE;
}
}
/* See if DFS is supported */
if ((cli->capabilities & CAP_DFS) && cli->dfsroot) {
- st->f_flag |= SMBC_VFS_FEATURE_DFS;
+ flags |= SMBC_VFS_FEATURE_DFS;
}
+#if HAVE_STATVFS_F_FLAG
+ st->f_flag = flags;
+#elif HAVE_STATVFS_F_FLAGS
+ st->f_flags = flags;
+#endif
+
return 0;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list