Commit f4ef8683 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Aurelio Colosimo

diag.h: temporarily define DBGV and DBGV_ARGS

This allows to uncomment the original DBGV in ptp code, until they are
turned to serious diagnostic messages. Then these two functions should
disappear, in my opinion.

Most DBGV use no arguments, so the default function is smaller; and
printf-like DBGV can be turned to DBGV_ARGS instead.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent f2eeb7b8
......@@ -28,5 +28,22 @@ extern int pp_vprintf(const char *fmt, va_list args)
extern int pp_vsprintf(char *buf, const char *, va_list)
__attribute__ ((format (printf, 2, 0)));
/*
* Temporarily, define DBGV. I should get __attribute__((deprecated))
* at some point, and then disappear over time.
*/
static inline void DBGV(const char *msg) /* most DBGV are constant strings */
{
pp_printf("%s", msg);
}
static inline void DBGV_ARGS(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
pp_vprintf(fmt, args);
va_end(args);
}
#endif /* __PTP_DIAG_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment