xref: /openbmc/linux/net/batman-adv/log.c (revision 3a35093a)
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (C) 2010-2020  B.A.T.M.A.N. contributors:
3  *
4  * Marek Lindner
5  */
6 
7 #include "log.h"
8 #include "main.h"
9 
10 #include <stdarg.h>
11 
12 #include "trace.h"
13 
14 /**
15  * batadv_debug_log() - Add debug log entry
16  * @bat_priv: the bat priv with all the soft interface information
17  * @fmt: format string
18  *
19  * Return: 0 on success or negative error number in case of failure
20  */
21 int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...)
22 {
23 	struct va_format vaf;
24 	va_list args;
25 
26 	va_start(args, fmt);
27 
28 	vaf.fmt = fmt;
29 	vaf.va = &args;
30 
31 	trace_batadv_dbg(bat_priv, &vaf);
32 
33 	va_end(args);
34 
35 	return 0;
36 }
37