summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default.c
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2012-03-10 19:16:06 +0100
committerVolker Lendecke <vl@samba.org>2012-03-11 14:18:04 +0100
commitf0bba969d87f0fd5c7d3f1ba001a5c9a754cd7ed (patch)
tree6e5c4b21eb5b381b0bc9e62639dc77f41c69707c /source3/modules/vfs_default.c
parent51e785949c5908912a9b0ae903e7c18d898808fc (diff)
downloadsamba-f0bba969d87f0fd5c7d3f1ba001a5c9a754cd7ed.tar.gz
samba-f0bba969d87f0fd5c7d3f1ba001a5c9a754cd7ed.tar.bz2
samba-f0bba969d87f0fd5c7d3f1ba001a5c9a754cd7ed.zip
s3: Improve statvfs support
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Sun Mar 11 14:18:04 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r--source3/modules/vfs_default.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index fd0ff0aa71..1dbd308368 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -108,15 +108,15 @@ static uint32_t vfswrap_fs_capabilities(struct vfs_handle_struct *handle,
connection_struct *conn = handle->conn;
uint32_t caps = FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
struct smb_filename *smb_fname_cpath = NULL;
+ struct vfs_statvfs_struct statbuf;
NTSTATUS status;
- int ret = -1;
+ int ret;
-#if defined(DARWINOS) || (defined(BSD) && defined(BSD_STATVFS_BSIZE))
- struct vfs_statvfs_struct statbuf;
ZERO_STRUCT(statbuf);
- sys_statvfs(conn->connectpath, &statbuf);
- caps = statbuf.FsCapabilities;
-#endif
+ ret = sys_statvfs(conn->connectpath, &statbuf);
+ if (ret == 0) {
+ caps = statbuf.FsCapabilities;
+ }
*p_ts_res = TIMESTAMP_SET_SECONDS;