Fix vfs module sample for new interface.
authorJeremy Allison <jra@samba.org>
Sat, 26 Sep 2009 03:51:50 +0000 (20:51 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 26 Sep 2009 03:51:50 +0000 (20:51 -0700)
Jeremy.

examples/VFS/shadow_copy_test.c

index 1ba46b71762d123882729027beabb5d95ead27b8..fab7007046f51373bd8d0aec399c7e6f637a5b25 100644 (file)
@@ -2,6 +2,7 @@
  * TEST implementation of an Shadow Copy module
  *
  * Copyright (C) Stefan Metzmacher     2003
+ * Copyright (C) Jeremy Allison 2009.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -74,13 +75,11 @@ static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fs
 
 /* VFS operations structure */
 
-static vfs_op_tuple shadow_copy_test_ops[] = { 
-       {SMB_VFS_OP(test_get_shadow_copy_data), SMB_VFS_OP_GET_SHADOW_COPY_DATA,SMB_VFS_LAYER_OPAQUE},
-
-       {SMB_VFS_OP(NULL),                      SMB_VFS_OP_NOOP,                SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_test_shadow_copy_fns = {
+       .get_shadow_copy_data = test_get_shadow_copy_data
 };
 
-NTSTATUS init_module(void)
+NTSTATUS vfs_shadow_copy_test_init(void)
 {
-       return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy_test", shadow_copy_test_ops);
+       return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy_test", &vfs_test_shadow_copy_fns);
 }