summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_tsmsm.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-01-17 16:51:14 +0300
committerAlexander Bokovoy <ab@samba.org>2008-01-17 16:59:29 +0300
commit03387a0f5886d449eda359a5acecd830f3bd35bc (patch)
treeeff51ba251254ee3954f60b557ec4d1ff9aa553c /source3/modules/vfs_tsmsm.c
parent026a66abecea3e3a54cdbfb97129d5e65608e5df (diff)
downloadsamba-03387a0f5886d449eda359a5acecd830f3bd35bc.tar.gz
samba-03387a0f5886d449eda359a5acecd830f3bd35bc.tar.xz
samba-03387a0f5886d449eda359a5acecd830f3bd35bc.zip
Remove is_remotestorage() call from VFS. We already have statvfs() there to handle FS capabilities.
As discussed with Volker, it is better to calculate FS capabilities at connection time. We already do this with help of VFS statvfs() call which allows to fill-in system-specific attributes including FS capabilities. So just re-use it if you want to represent additional capabilities in your modules. The only caution is that you need to call underlying statvfs() call to actually get system-specific capabilities (and other fields) added. Then add module-specific ones. (This used to be commit e342ca0d931f9a5c8ec9e472dc9c63f1fe012b3a)
Diffstat (limited to 'source3/modules/vfs_tsmsm.c')
-rw-r--r--source3/modules/vfs_tsmsm.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index c737032907a..2805488e8b5 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -294,8 +294,14 @@ static int tsmsm_set_offline(struct vfs_handle_struct *handle,
return result;
}
-static bool tsmsm_is_remotestorage(struct vfs_handle_struct *handle, const char *path) {
- return True;
+static bool tsmsm_statvfs(struct vfs_handle_struct *handle, const char *path, vfs_statvfs_struct *statbuf)
+{
+ bool result;
+
+ result = SMB_VFS_NEXT_STATVFS(handle, path, statbuf);
+ statbuf->FsCapabilities | = FILE_SUPPORTS_REMOTE_STORAGE | FILE_SUPPORTS_REPARSE_POINTS;
+
+ return result;
}
static vfs_op_tuple vfs_tsmsm_ops[] = {
@@ -304,6 +310,8 @@ static vfs_op_tuple vfs_tsmsm_ops[] = {
{SMB_VFS_OP(tsmsm_connect), SMB_VFS_OP_CONNECT,
SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(tsmsm_statvfs), SMB_VFS_OP_STATVFS,
+ SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(tsmsm_aio_force), SMB_VFS_OP_AIO_FORCE,
SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(tsmsm_aio_return), SMB_VFS_OP_AIO_RETURN,
@@ -314,11 +322,9 @@ static vfs_op_tuple vfs_tsmsm_ops[] = {
SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(tsmsm_sendfile), SMB_VFS_OP_SENDFILE,
SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(tsmsm_is_offline),SMB_VFS_OP_IS_OFFLINE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(tsmsm_set_offline),SMB_VFS_OP_SET_OFFLINE,
+ {SMB_VFS_OP(tsmsm_is_offline), SMB_VFS_OP_IS_OFFLINE,
SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(tsmsm_is_remotestorage),SMB_VFS_OP_IS_REMOTESTORAGE,
+ {SMB_VFS_OP(tsmsm_set_offline), SMB_VFS_OP_SET_OFFLINE,
SMB_VFS_LAYER_OPAQUE},
/* Finish VFS operations definition */