Made the used debug print function settable. Changed to ktrace_printf().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-04-20 02:55:45 +00:00
parent e378ab1c09
commit 17619433ba
@@ -9,12 +9,16 @@
#include <Drivers.h> #include <Drivers.h>
//#define UNIX_DEBUG_PRINT dprintf
#define UNIX_DEBUG_PRINT ktrace_printf
#if UNIX_DEBUG_LEVEL #if UNIX_DEBUG_LEVEL
# define TRACE(args...) dprintf(args) # define TRACE(args...) UNIX_DEBUG_PRINT(args)
# define PRINT_ERROR(error) \ # define PRINT_ERROR(error) \
do { \ do { \
dprintf("[%ld] l. %d: %s: %s\n", find_thread(NULL), \ UNIX_DEBUG_PRINT("[%ld] l. %d: %s: %s\n", \
__LINE__, __PRETTY_FUNCTION__, strerror(error)); \ find_thread(NULL), __LINE__, __PRETTY_FUNCTION__, \
strerror(error)); \
} while (false) } while (false)
# if UNIX_DEBUG_LEVEL >= 2 # if UNIX_DEBUG_LEVEL >= 2
# define REPORT_ERROR(error) PRINT_ERROR(error) # define REPORT_ERROR(error) PRINT_ERROR(error)