]>
Commit | Line | Data |
---|---|---|
7db7d9f3 | 1 | // SPDX-License-Identifier: GPL-2.0 |
68e039f9 | 2 | /* Copyright (C) 2010-2020 B.A.T.M.A.N. contributors: |
ba412080 SE |
3 | * |
4 | * Marek Lindner | |
ba412080 SE |
5 | */ |
6 | ||
7 | #include "log.h" | |
8 | #include "main.h" | |
9 | ||
ba412080 SE |
10 | #include <stdarg.h> |
11 | ||
d331a739 | 12 | #include "trace.h" |
00caf6a2 | 13 | |
0dacc7fa SE |
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 | ||
0dacc7fa SE |
31 | trace_batadv_dbg(bat_priv, &vaf); |
32 | ||
33 | va_end(args); | |
34 | ||
35 | return 0; | |
36 | } |