@@ -16,6 +16,15 @@ void tep_info(const char *fmt, ...);
int tep_vprint(const char *name, enum tep_loglevel level,
bool print_err, const char *fmt, va_list ap);
+#define __deprecated(msg) __attribute__((deprecated("msg")))
+
+/* For backward compatibilty, do not use */
+int tep_vwarning(const char *name, const char *fmt, va_list ap) __deprecated(Use tep_vprint instead);
+void pr_stat(const char *fmt, ...) __deprecated(Use tep_info instead);
+void vpr_stat(const char *fmt, va_list ap) __deprecated(Use tep_vprint instead);
+void __pr_stat(const char *fmt, ...) __deprecated(Use tep_info instead);;
+void __vpr_stat(const char *fmt, va_list ap) __deprecated(Use tep_vprint instead);;
+
#define min(x, y) ({ \
typeof(x) _min1 = (x); \
typeof(y) _min2 = (y); \
@@ -79,3 +79,19 @@ void tep_info(const char *fmt, ...)
tep_vprint("libtraceevent", TEP_LOG_INFO, false, fmt, ap);
va_end(ap);
}
+
+/* The below is for backward compatibility */
+int __weak tep_vwarning(const char *name, const char *fmt, va_list ap)
+{
+ return tep_vprint(name, TEP_LOG_WARNING, true, fmt, ap);
+}
+
+void pr_stat(const char *fmt, ...) __attribute__((weak, alias("tep_info")));
+void __pr_stat(const char *fmt, ...) __attribute__((weak, alias("tep_info")));
+
+void __weak __vpr_stat(const char *fmt, va_list ap)
+{
+ tep_vprint("libtraceevent", TEP_LOG_INFO, false, fmt, ap);
+}
+
+void vpr_stat(const char *fmt, va_list ap) __attribute__((weak, alias("__vpr_stat")));