summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_gpfs.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_gpfs.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_gpfs.c')
-rw-r--r--source3/modules/vfs_gpfs.c105
1 files changed, 21 insertions, 84 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index cde80f0021..25eaa4b62f 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1057,96 +1057,33 @@ static int vfs_gpfs_lstat(struct vfs_handle_struct *handle,
return 0;
}
-/* VFS operations structure */
-
-static vfs_op_tuple gpfs_op_tuples[] = {
-
- { SMB_VFS_OP(vfs_gpfs_kernel_flock),
- SMB_VFS_OP_KERNEL_FLOCK,
- SMB_VFS_LAYER_OPAQUE },
-
- { SMB_VFS_OP(vfs_gpfs_setlease),
- SMB_VFS_OP_LINUX_SETLEASE,
- SMB_VFS_LAYER_OPAQUE },
-
- { SMB_VFS_OP(vfs_gpfs_get_real_filename),
- SMB_VFS_OP_GET_REAL_FILENAME,
- SMB_VFS_LAYER_OPAQUE },
-
- { SMB_VFS_OP(gpfsacl_fget_nt_acl),
- SMB_VFS_OP_FGET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_get_nt_acl),
- SMB_VFS_OP_GET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_fset_nt_acl),
- SMB_VFS_OP_FSET_NT_ACL,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_get_file),
- SMB_VFS_OP_SYS_ACL_GET_FILE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_get_fd),
- SMB_VFS_OP_SYS_ACL_GET_FD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_set_file),
- SMB_VFS_OP_SYS_ACL_SET_FILE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_set_fd),
- SMB_VFS_OP_SYS_ACL_SET_FD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfsacl_sys_acl_delete_def_file),
- SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_chmod),
- SMB_VFS_OP_CHMOD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_fchmod),
- SMB_VFS_OP_FCHMOD,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_close),
- SMB_VFS_OP_CLOSE,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfs_set_xattr),
- SMB_VFS_OP_SETXATTR,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(gpfs_get_xattr),
- SMB_VFS_OP_GETXATTR,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_stat),
- SMB_VFS_OP_STAT,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_fstat),
- SMB_VFS_OP_FSTAT,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(vfs_gpfs_lstat),
- SMB_VFS_OP_LSTAT,
- SMB_VFS_LAYER_TRANSPARENT },
-
- { SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP }
-
+static struct vfs_fn_pointers vfs_gpfs_fns = {
+ .kernel_flock = vfs_gpfs_kernel_flock,
+ .setlease = vfs_gpfs_setlease,
+ .get_real_filename = vfs_gpfs_get_real_filename,
+ .fget_nt_acl = gpfsacl_fget_nt_acl,
+ .get_nt_acl = gpfsacl_get_nt_acl,
+ .fset_nt_acl = gpfsacl_fset_nt_acl,
+ .sys_acl_get_file = gpfsacl_sys_acl_get_file,
+ .sys_acl_get_fd = gpfsacl_sys_acl_get_fd,
+ .sys_acl_set_file = gpfsacl_sys_acl_set_file,
+ .sys_acl_set_fd = gpfsacl_sys_acl_set_fd,
+ .sys_acl_delete_def_file = gpfsacl_sys_acl_delete_def_file,
+ .chmod = vfs_gpfs_chmod,
+ .fchmod = vfs_gpfs_fchmod,
+ .close_fn = vfs_gpfs_close,
+ .set_xattr = gpfs_set_xattr,
+ .get_xattr = gpfs_get_xattr,
+ .stat = vfs_gpfs_stat,
+ .fstat = vfs_gpfs_fstat,
+ .lstat = vfs_gpfs_lstat,
};
-
NTSTATUS vfs_gpfs_init(void);
NTSTATUS vfs_gpfs_init(void)
{
init_gpfs();
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "gpfs",
- gpfs_op_tuples);
+ &vfs_gpfs_fns);
}