summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_onefs.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-23 20:28:58 -0400
committerVolker Lendecke <vl@samba.org>2009-07-24 11:42:05 -0400
commit033185e2a1b2892fe8dc74a18a38e5e13e08cb22 (patch)
tree67f652f7c4caba015eb3ad7b5ad7d0f6ed56cc8d /source3/modules/vfs_onefs.c
parentbe5cf236968658263b0be5e1e4742741c70f65f8 (diff)
downloadsamba-033185e2a1b2892fe8dc74a18a38e5e13e08cb22.tar.gz
samba-033185e2a1b2892fe8dc74a18a38e5e13e08cb22.tar.bz2
samba-033185e2a1b2892fe8dc74a18a38e5e13e08cb22.zip
Make the smbd VFS typesafe
Diffstat (limited to 'source3/modules/vfs_onefs.c')
-rw-r--r--source3/modules/vfs_onefs.c110
1 files changed, 37 insertions, 73 deletions
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index 1a37622bea..05f6cfdc74 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -246,82 +246,46 @@ static uint32_t onefs_fs_capabilities(struct vfs_handle_struct *handle)
return result | SMB_VFS_NEXT_FS_CAPABILITIES(handle);
}
-static vfs_op_tuple onefs_ops[] = {
- {SMB_VFS_OP(onefs_connect), SMB_VFS_OP_CONNECT,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_opendir), SMB_VFS_OP_OPENDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_readdir), SMB_VFS_OP_READDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_seekdir), SMB_VFS_OP_SEEKDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_telldir), SMB_VFS_OP_TELLDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_rewinddir), SMB_VFS_OP_REWINDDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_mkdir), SMB_VFS_OP_MKDIR,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_closedir), SMB_VFS_OP_CLOSEDIR,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_init_search_op), SMB_VFS_OP_INIT_SEARCH_OP,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_open), SMB_VFS_OP_OPEN,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_create_file), SMB_VFS_OP_CREATE_FILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_close), SMB_VFS_OP_CLOSE,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_sendfile), SMB_VFS_OP_SENDFILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_recvfile), SMB_VFS_OP_RECVFILE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_rename), SMB_VFS_OP_RENAME,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_stat), SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_fstat), SMB_VFS_OP_FSTAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_lstat), SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_get_alloc_size), SMB_VFS_OP_GET_ALLOC_SIZE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_unlink), SMB_VFS_OP_UNLINK,
- SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(onefs_ntimes), SMB_VFS_OP_NTIMES,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_streaminfo), SMB_VFS_OP_STREAMINFO,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_brl_lock_windows), SMB_VFS_OP_BRL_LOCK_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_brl_unlock_windows), SMB_VFS_OP_BRL_UNLOCK_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_brl_cancel_windows), SMB_VFS_OP_BRL_CANCEL_WINDOWS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_strict_lock), SMB_VFS_OP_STRICT_LOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_strict_unlock), SMB_VFS_OP_STRICT_UNLOCK,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_notify_watch), SMB_VFS_OP_NOTIFY_WATCH,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_fset_nt_acl), SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_statvfs), SMB_VFS_OP_STATVFS,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(onefs_get_real_filename), SMB_VFS_OP_GET_REAL_FILENAME,
- SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers onefs_fns = {
+ .connect = onefs_connect,
+ .fs_capabilities = onefs_fs_capabilities,
+ .opendir = onefs_opendir,
+ .readdir = onefs_readdir,
+ .seekdir = onefs_seekdir,
+ .telldir = onefs_telldir,
+ .rewinddir = onefs_rewinddir,
+ .mkdir = onefs_mkdir,
+ .closedir = onefs_closedir,
+ .init_search_op = onefs_init_search_op,
+ .open = onefs_open,
+ .create_file = onefs_create_file,
+ .close = onefs_close,
+ .sendfile = onefs_sendfile,
+ .recvfile = onefs_recvfile,
+ .rename = onefs_rename,
+ .stat = onefs_stat,
+ .fstat = onefs_fstat,
+ .lstat = onefs_lstat,
+ .get_alloc_size = onefs_get_alloc_size,
+ .unlink = onefs_unlink,
+ .ntimes = onefs_ntimes,
+ .file_id_create = onefs_file_id_create,
+ .streaminfo = onefs_streaminfo,
+ .brl_lock_windows = onefs_brl_lock_windows,
+ .brl_unlock_windows = onefs_brl_unlock_windows,
+ .brl_cancel_windows = onefs_brl_cancel_windows,
+ .strict_lock = onefs_strict_lock,
+ .strict_unlock = onefs_strict_unlock,
+ .notify_watch = onefs_notify_watch,
+ .fget_nt_acl = onefs_fget_nt_acl,
+ .get_nt_acl = onefs_get_nt_acl,
+ .fset_nt_acl = onefs_fset_nt_acl,
+ .statvfs = onefs_statvfs,
+ .get_real_filename = onefs_get_real_filename,
};
NTSTATUS vfs_onefs_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "onefs",
- onefs_ops);
+ &onefs_fns);
}