diff options
author | Brian Behlendorf <[email protected]> | 2012-02-09 16:38:42 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-02-09 16:41:46 -0800 |
commit | feedc4360114941021ff0053a8f979235dd673da (patch) | |
tree | 2abeb6e7616568e86311fce53698563585e25efe | |
parent | 9a8b7a7458a3d76d35b26e7f2b737abd9ab4c6ef (diff) |
Add missing spl_debug_* helpers
When building the spl with --disable-debug-log the __SDEBUG()
macro and spl_debug_* helper functions were undefined. This
change adds the missing functions so the upper layers compiling
against the spl don't need to be aware of how the spl was built.
Signed-off-by: Brian Behlendorf <[email protected]>
-rw-r--r-- | include/spl-debug.h | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/include/spl-debug.h b/include/spl-debug.h index 98164966c..42da3e4e8 100644 --- a/include/spl-debug.h +++ b/include/spl-debug.h @@ -181,6 +181,7 @@ void spl_debug_fini(void); /* Debug log support disabled */ #else /* DEBUG_LOG */ +#define __SDEBUG(x, y, mask, fmt, a...) ((void)0) #define SDEBUG(mask, fmt, a...) ((void)0) #define SDEBUG_LIMIT(x, y, fmt, a...) ((void)0) #define SWARN(fmt, a...) ((void)0) @@ -193,8 +194,47 @@ void spl_debug_fini(void); #define SRETURN(x) return (x) #define SGOTO(x, y) { ((void)(y)); goto x; } -static inline int spl_debug_init(void) { return (0); } -static inline void spl_debug_fini(void) { return; } +static inline unsigned long +spl_debug_set_mask(unsigned long mask) { + return (0); +} + +static inline unsigned long +spl_debug_get_mask(void) { + return (0); +} + +static inline unsigned long +spl_debug_set_subsys(unsigned long mask) { + return (0); +} + +static inline unsigned long +spl_debug_get_subsys(void) { + return (0); +} + +static inline int +spl_debug_set_mb(int mb) { + return (0); +} + +static inline int +spl_debug_get_mb(void) { + return (0); +} + +static inline int +spl_debug_dumplog(int flags) +{ + return (0); +} + +static inline void +spl_debug_dumpstack(struct task_struct *tsk) +{ + return; +} static inline void spl_debug_bug(char *file, const char *fn, const int line, int fl) @@ -209,6 +249,28 @@ spl_debug_msg(void *arg, int subsys, int mask, const char *file, return (0); } +static inline int +spl_debug_clear_buffer(void) +{ + return (0); +} + +static inline int +spl_debug_mark_buffer(char *text) +{ + return (0); +} + +static inline int +spl_debug_init(void) { + return (0); +} + +static inline void +spl_debug_fini(void) { + return; +} + #endif /* DEBUG_LOG */ #endif /* SPL_DEBUG_INTERNAL_H */ |