blob: 7a93a1e94c40eb4e26c9ed3c6c4068d97830aa05 [file] [log] [blame]
Sven Eckelmann7db7d9f2017-11-19 15:05:11 +01001// SPDX-License-Identifier: GPL-2.0
Sven Eckelmanncfa55c62021-01-01 00:00:01 +01002/* Copyright (C) B.A.T.M.A.N. contributors:
Sven Eckelmannba412082016-05-15 23:48:31 +02003 *
4 * Marek Lindner
Sven Eckelmannba412082016-05-15 23:48:31 +02005 */
6
7#include "log.h"
8#include "main.h"
9
Alexey Dobriyanc0891ac2021-08-02 23:40:32 +030010#include <linux/stdarg.h>
Sven Eckelmannba412082016-05-15 23:48:31 +020011
Sven Eckelmannd331a732018-08-10 23:36:16 +020012#include "trace.h"
Sven Eckelmann00caf6a2018-08-10 23:36:15 +020013
Sven Eckelmann0dacc7fa2018-10-21 11:30:31 +020014/**
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 */
21int 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
Sven Eckelmann0dacc7fa2018-10-21 11:30:31 +020031 trace_batadv_dbg(bat_priv, &vaf);
32
33 va_end(args);
34
35 return 0;
36}