recycle.c (was block.c)

Stefan (metze) Metzmacher metze at metzemix.de
Fri Sep 6 10:25:59 GMT 2002


Hi Jürgen, Alexander,

the current vfs_recycle.c looks very nice!

but here is a patch to vfs_recycle.c

to use its own debug class

it now depend on a patch to add DBGC_VFS...
but abartlet is going to apply it:-)


metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de>
-------------- next part --------------
--- vfs_recycle.c	Mon Sep  2 20:32:42 2002
+++ vfs_recycle.c-new	Fri Sep  6 11:11:46 2002
@@ -21,22 +21,12 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include "config.h"
-#include <stdio.h>
-#include <sys/stat.h>
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#endif
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <errno.h>
-#include <string.h>
-#include <includes.h>
-#include <vfs.h>
+#include "includes.h"
+
+static int vfs_recycle_debug_level = DBGC_VFS;
+
+#undef DBGC_CLASS
+#define DBGC_CLASS vfs_recycle_debug_level
 
 static const char delimiter = '|';		/* delimiter for options */
 
@@ -88,6 +78,13 @@ vfs_op_tuple *vfs_init(int *vfs_version,
 	DEBUG(10, ("Initializing VFS module recycle\n"));
 	*vfs_version = SMB_VFS_INTERFACE_VERSION;
 	memcpy(&default_vfs_ops, def_vfs_ops, sizeof(struct vfs_ops));
+
+	vfs_recycle_debug_level = debug_add_class("vfs_recycle");
+	if (vfs_recycle_debug_level == -1) {
+		vfs_recycle_debug_level = DBGC_VFS;
+		DEBUG(0, ("vfs_recycle: Couldn't register custom debugging class!\n"));
+	} else DEBUG(0, ("vfs_recycle: Debug class number of 'vfs_recycle': %d\n", vfs_recycle_debug_level));
+
 	return recycle_ops;
 }
 


More information about the samba-technical mailing list