diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-11-07 17:48:00 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-11-07 17:48:00 +0000 |
commit | 0e130bb977986dca79b4fad787e640525e7283eb (patch) | |
tree | 50b0989057e6ae4a2f07b97fe015f208a8b7bd29 /include | |
parent | b7f6cf7788147fe4b7ebc9a50bc923cdafbdedec (diff) |
Extra debugging aids and messages
* Added dahdi_dev_dbg() macro to print when we don't (yet)
have a span number.
* Added a new debug category: DAHDI_DBG_ASSIGN
* Made sure error return code paths prints helpfull messages
* Promote error messages from INFO to NOTICE
* Change some errno values from EINVAL to EFAULT (internal
errors not caused by user input)
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10328 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include')
-rw-r--r-- | include/dahdi/kernel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index d3c97c8..1e580fd 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1567,6 +1567,7 @@ struct mutex { * be of the form DAHDI_DBG_* */ #define DAHDI_DBG_GENERAL BIT(0) +#define DAHDI_DBG_ASSIGN BIT(1) #define DAHDI_DBG_DEVICES BIT(7) /* instantiation/destruction etc. */ #define dahdi_dbg(bits, fmt, ...) \ ((void)((debug & (DAHDI_DBG_ ## bits)) && DAHDI_PRINTK(DEBUG, \ @@ -1579,6 +1580,10 @@ struct mutex { ((void)((debug & (DAHDI_DBG_ ## bits)) && \ chan_printk(DEBUG, "-" #bits, chan, \ "%s: " fmt, __func__, ## __VA_ARGS__))) +#define dahdi_dev_dbg(bits, dev, fmt, ...) \ + ((void)((debug & (DAHDI_DBG_ ## bits)) && \ + dev_printk(KERN_DEBUG, dev, \ + "DBG-%s(%s): " fmt, #bits, __func__, ## __VA_ARGS__))) #endif /* DAHDI_PRINK_MACROS_USE_debug */ #endif /* _DAHDI_KERNEL_H */ |