aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ufs_fs.h
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2006-06-25 05:47:24 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:01:03 -0700
commitabf5d15fd2e52517dd56a17a846d5a1f900b7db4 (patch)
treeea537760c201cea57b468044dc733e06781ece2b /include/linux/ufs_fs.h
parent[PATCH] ufs: Unmark CONFIG_UFS_FS_WRITE as BROKEN (diff)
downloadlinux-dev-abf5d15fd2e52517dd56a17a846d5a1f900b7db4.tar.xz
linux-dev-abf5d15fd2e52517dd56a17a846d5a1f900b7db4.zip
[PATCH] ufs: easy debug
Currently to turn on debug mode "user" has to edit ~10 files, to turn off he has to do it again. This patch introduce such changes: 1)turn on(off) debug messages via ".config" 2)remove unnecessary duplication of code 3)make "UFSD" macros more similar to function 4)fix some compiler warnings Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/ufs_fs.h')
-rw-r--r--include/linux/ufs_fs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 48394dae225d..28b31591f688 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -220,6 +220,19 @@ typedef __u16 __bitwise __fs16;
*/
#define UFS_MINFREE 5
#define UFS_DEFAULTOPT UFS_OPTTIME
+
+/*
+ * Debug code
+ */
+#ifdef CONFIG_UFS_DEBUG
+# define UFSD(f, a...) { \
+ printk ("UFSD (%s, %d): %s:", \
+ __FILE__, __LINE__, __FUNCTION__); \
+ printk (f, ## a); \
+ }
+#else
+# define UFSD(f, a...) /**/
+#endif
/*
* Turn file system block numbers into disk block addresses.