Merge branch 'linux-have-spl-debug' into refs/top-bases/linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2010-07-20 13:44:40 -07:00
commit ecf3f0b14f
1 changed files with 10 additions and 2 deletions

View File

@ -55,8 +55,16 @@ extern int zfs_flags;
#ifdef ZFS_DEBUG #ifdef ZFS_DEBUG
#if defined(_KERNEL) && defined(HAVE_SPL) #if defined(_KERNEL) && defined(HAVE_SPL)
#include <sys/debug.h> /*
#define dprintf(...) CDEBUG_LIMIT(D_DPRINTF, __VA_ARGS__) * Log ZFS debug messages as the spl SS_USER1 subsystem.
*/
#include <spl-debug.h>
#ifdef SS_DEBUG_SUBSYS
#undef SS_DEBUG_SUBSYS
#endif
#define SS_DEBUG_SUBSYS SS_USER1
#define dprintf(...) SDEBUG_LIMIT(SD_DPRINTF, __VA_ARGS__)
#else #else
extern void __dprintf(const char *file, const char *func, extern void __dprintf(const char *file, const char *func,
int line, const char *fmt, ...); int line, const char *fmt, ...);