Skip to content

Commit

Permalink
[PATCH] dm: add debug macro
Browse files Browse the repository at this point in the history
Add CONFIG_DM_DEBUG and DMDEBUG() macro.

Signed-off-by: Bryn Reeves <breeves@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Bryn Reeves authored and Linus Torvalds committed Oct 3, 2006
1 parent 8560ed6 commit cc10920
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/md/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ config BLK_DEV_DM

If unsure, say N.

config DM_DEBUG
boolean "Device mapper debugging support"
depends on BLK_DEV_DM && EXPERIMENTAL
---help---
Enable this for messages that may help debug device-mapper problems.

If unsure, say N.

config DM_CRYPT
tristate "Crypt target support"
depends on BLK_DEV_DM && EXPERIMENTAL
Expand Down
5 changes: 5 additions & 0 deletions drivers/md/dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
#define DMERR(f, arg...) printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
#define DMWARN(f, arg...) printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
#define DMINFO(f, arg...) printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
#ifdef CONFIG_DM_DEBUG
# define DMDEBUG(f, arg...) printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX " DEBUG: " f "\n", ## arg)
#else
# define DMDEBUG(f, arg...) do {} while (0)
#endif

#define DMEMIT(x...) sz += ((sz >= maxlen) ? \
0 : scnprintf(result + sz, maxlen - sz, x))
Expand Down

0 comments on commit cc10920

Please sign in to comment.