From abf5d15fd2e52517dd56a17a846d5a1f900b7db4 Mon Sep 17 00:00:00 2001 From: Evgeniy Dushistov Date: Sun, 25 Jun 2006 05:47:24 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ufs_fs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/linux/ufs_fs.h') 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. -- cgit v1.2.2