-#define DEBUG_MSG_DATA_INIT(cdls, subsystem, file, func, ln ) { \
- /* msg_cdls */ (cdls), \
- /* msg_subsys */ (subsystem), \
- /* msg_file */ (file), \
- /* msg_fn */ (func), \
- /* msg_line */ (ln) \
- }
-
-
-extern int libcfs_debug_vmsg2(cfs_debug_limit_state_t *cdls,
- int subsys, int mask,
- const char *file, const char *fn, const int line,
- const char *format1, va_list args,
- const char *format2, ...)
- __attribute__ ((format (printf, 9, 10)));
-
-#define libcfs_debug_vmsg(cdls, subsys, mask, file, fn, line, format, args) \
- libcfs_debug_vmsg2(cdls, subsys, mask, file, fn,line,format,args,NULL,NULL)
-
-#define libcfs_debug_msg(cdls, subsys, mask, file, fn, line, format, ...) \
- libcfs_debug_vmsg2(cdls, subsys, mask, file, fn,line,NULL,NULL,format, ## __VA_ARGS__)
-
-#define cdebug_va(cdls, mask, file, func, line, fmt, args) do { \
- CFS_CHECK_STACK(); \
- \
- if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) \
- libcfs_debug_vmsg(cdls, DEBUG_SUBSYSTEM, (mask), \
- (file), (func), (line), fmt, args); \
-} while(0)
-
-#define cdebug(cdls, mask, file, func, line, fmt, ...) do { \
- CFS_CHECK_STACK(); \
- \
- if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) \
- libcfs_debug_msg(cdls, DEBUG_SUBSYSTEM, (mask), \
- (file), (func), (line), fmt, ## __VA_ARGS__);\
-} while(0)
-
-extern void libcfs_assertion_failed(const char *expr, const char *file,
- const char *fn, const int line);
-
-/* one more external symbol that tracefile provides: */
-extern int cfs_trace_copyout_string(char *usr_buffer, int usr_buffer_nob,
- const char *knl_buffer, char *append);
-
-
-#if defined(HAVE_BGL_SUPPORT)
-#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/bgl/ion/tmp/lustre-log"
-#elif defined(__arch_um__)
-#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/r/tmp/lustre-log"
-#elif defined(__WINNT__)
-#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "\\SystemRoot\\temp\\lustre-log"
-#else