diff options
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/kernel.h')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kernel.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index b60b346a53c9..ecdfcdc89230 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -177,8 +177,12 @@ scnprintf(char *buf, size_t size, const char *fmt, ...) * unless DEBUG is defined: */ #ifdef DEBUG -#define pr_debug(fmt, ...) \ - log(LOG_DEBUG, fmt, ##__VA_ARGS__) +extern int linuxkpi_debug; +#define pr_debug(fmt, ...) \ + do { \ + if (linuxkpi_debug) \ + log(LOG_DEBUG, fmt, ##__VA_ARGS__); \ + } while (0) #define pr_devel(fmt, ...) \ log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__) #else |
