diff options
author | Brad Smith <brad@comstyle.com> | 2012-03-10 19:16:06 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-03-11 14:18:04 +0100 |
commit | f0bba969d87f0fd5c7d3f1ba001a5c9a754cd7ed (patch) | |
tree | 6e5c4b21eb5b381b0bc9e62639dc77f41c69707c /source3/smbd | |
parent | 51e785949c5908912a9b0ae903e7c18d898808fc (diff) | |
download | samba-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/smbd')
-rw-r--r-- | source3/smbd/statvfs.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/smbd/statvfs.c b/source3/smbd/statvfs.c index 1e72a8e48b..5cefe2d4c2 100644 --- a/source3/smbd/statvfs.c +++ b/source3/smbd/statvfs.c @@ -151,12 +151,17 @@ static int linux_statvfs(const char *path, vfs_statvfs_struct *statbuf) statbuf->TotalFileNodes = statvfs_buf.f_files; statbuf->FreeFileNodes = statvfs_buf.f_ffree; statbuf->FsIdentifier = statvfs_buf.f_fsid; - - /* Good defaults for Linux filesystems are case sensitive - * and case preserving. + /* Try to extrapolate some of the fs flags into the + * capabilities */ statbuf->FsCapabilities = FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES; +#ifdef ST_QUOTA + if (statvfs_buf.f_flag & ST_QUOTA) + statbuf->FsCapabilities |= FILE_VOLUME_QUOTAS; +#endif + if (statvfs_buf.f_flag & ST_RDONLY) + statbuf->FsCapabilities |= FILE_READ_ONLY_VOLUME; } return result; } |