-#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 { \
- CHECK_STACK(); \
- \
- if (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 { \
- CHECK_STACK(); \
- \
- if (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);
-
-
-#if defined(HAVE_BGL_SUPPORT)
-#define DEBUG_FILE_PATH_DEFAULT "/bgl/ion/tmp/lustre-log"
-#elif defined(__arch_um__)
-#define DEBUG_FILE_PATH_DEFAULT "/r/tmp/lustre-log"
-#elif defined(__WINNT__)
-#define DEBUG_FILE_PATH_DEFAULT "\\SystemRoot\\temp\\lustre-log"
-#else
-#define DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
-#endif
+#define RETURN_EXIT \
+do { \
+ EXIT; \
+ return; \
+} while (0)
+
+extern int libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata,
+ const char *format1, ...)
+ __attribute__ ((format (printf, 2, 3)));
+
+extern int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
+ const char *format1,
+ va_list args, const char *format2, ...)
+ __attribute__ ((format (printf, 4, 5)));
+
+/* other external symbols that tracefile provides: */
+extern int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
+ const char __user *usr_buffer,
+ int usr_buffer_nob);
+extern int cfs_trace_copyout_string(char __user *usr_buffer, int usr_buffer_nob,
+ const char *knl_buffer, char *append);
+
+#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"