log.c 637 B

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