proc: remove obsolete comments
[safe/jmp/linux-2.6] / fs / jffs2 / debug.h
index da1417d..a113ecc 100644 (file)
@@ -1,30 +1,29 @@
 /*
  * JFFS2 -- Journalling Flash File System, Version 2.
  *
- * Copyright (C) 2001-2003 Red Hat, Inc.
+ * Copyright © 2001-2007 Red Hat, Inc.
  *
  * Created by David Woodhouse <dwmw2@infradead.org>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: debug.h,v 1.18 2005/09/21 10:26:26 dedekind Exp $
- *
  */
+
 #ifndef _JFFS2_DEBUG_H_
 #define _JFFS2_DEBUG_H_
 
-#include <linux/config.h>
+#include <linux/sched.h>
 
 #ifndef CONFIG_JFFS2_FS_DEBUG
 #define CONFIG_JFFS2_FS_DEBUG 0
 #endif
 
-#if CONFIG_JFFS2_FS_DEBUG == 1
+#if CONFIG_JFFS2_FS_DEBUG > 0
 /* Enable "paranoia" checks and dumps */
 #define JFFS2_DBG_PARANOIA_CHECKS
 #define JFFS2_DBG_DUMPS
 
-/* 
+/*
  * By defining/undefining the below macros one may select debugging messages
  * fro specific JFFS2 subsystems.
  */
 #define JFFS2_DBG_FSBUILD_MESSAGES
 #endif
 
-#if CONFIG_JFFS2_FS_DEBUG == 2
+#if CONFIG_JFFS2_FS_DEBUG > 1
 #define JFFS2_DBG_FRAGTREE2_MESSAGES
+#define JFFS2_DBG_READINODE2_MESSAGES
 #define JFFS2_DBG_MEMALLOC_MESSAGES
 #endif
 
 /* Sanity checks are supposed to be light-weight and enabled by default */
 #define JFFS2_DBG_SANITY_CHECKS
 
-/* 
+/*
  * Dx() are mainly used for debugging messages, they must go away and be
  * superseded by nicer dbg_xxx() macros...
  */
 #define JFFS2_ERROR(fmt, ...)                                          \
        do {                                                            \
                printk(JFFS2_ERR_MSG_PREFIX                             \
-                       " (%d) %s: " fmt, current->pid,                 \
-                       __FUNCTION__, ##__VA_ARGS__);                   \
+                       " (%d) %s: " fmt, task_pid_nr(current),         \
+                       __func__ , ##__VA_ARGS__);                      \
        } while(0)
 
 #define JFFS2_WARNING(fmt, ...)                                                \
        do {                                                            \
                printk(JFFS2_WARN_MSG_PREFIX                            \
-                       " (%d) %s: " fmt, current->pid,                 \
-                       __FUNCTION__, ##__VA_ARGS__);                   \
+                       " (%d) %s: " fmt, task_pid_nr(current),         \
+                       __func__ , ##__VA_ARGS__);                      \
        } while(0)
-                       
+
 #define JFFS2_NOTICE(fmt, ...)                                         \
        do {                                                            \
                printk(JFFS2_NOTICE_MSG_PREFIX                          \
-                       " (%d) %s: " fmt, current->pid,                 \
-                       __FUNCTION__, ##__VA_ARGS__);                   \
+                       " (%d) %s: " fmt, task_pid_nr(current),         \
+                       __func__ , ##__VA_ARGS__);                      \
        } while(0)
 
 #define JFFS2_DEBUG(fmt, ...)                                          \
        do {                                                            \
                printk(JFFS2_DBG_MSG_PREFIX                             \
-                       " (%d) %s: " fmt, current->pid,                 \
-                       __FUNCTION__, ##__VA_ARGS__);                   \
+                       " (%d) %s: " fmt, task_pid_nr(current),         \
+                       __func__ , ##__VA_ARGS__);                      \
        } while(0)
 
-/* 
+/*
  * We split our debugging messages on several parts, depending on the JFFS2
  * subsystem the message belongs to.
  */
 #else
 #define dbg_readinode(fmt, ...)
 #endif
+#ifdef JFFS2_DBG_READINODE2_MESSAGES
+#define dbg_readinode2(fmt, ...)       JFFS2_DEBUG(fmt, ##__VA_ARGS__)
+#else
+#define dbg_readinode2(fmt, ...)
+#endif
 
 /* Fragtree build debugging messages */
 #ifdef JFFS2_DBG_FRAGTREE_MESSAGES
 #define dbg_memalloc(fmt, ...)
 #endif
 
+/* Watch the XATTR subsystem */
+#ifdef JFFS2_DBG_XATTR_MESSAGES
+#define dbg_xattr(fmt, ...)  JFFS2_DEBUG(fmt, ##__VA_ARGS__)
+#else
+#define dbg_xattr(fmt, ...)
+#endif 
 
 /* "Sanity" checks */
 void