iotests/129: Do not check @busy
[qemu.git] / tools / virtiofsd / fuse_log.c
blob745d88cd2a496fd7554fa21b3833b32ea6f7012d
1 /*
2 * FUSE: Filesystem in Userspace
3 * Copyright (C) 2019 Red Hat, Inc.
5 * Logging API.
7 * This program can be distributed under the terms of the GNU LGPLv2.
8 * See the file COPYING.LIB
9 */
11 #include "qemu/osdep.h"
12 #include "fuse_log.h"
15 static void default_log_func(__attribute__((unused)) enum fuse_log_level level,
16 const char *fmt, va_list ap)
18 vfprintf(stderr, fmt, ap);
21 static fuse_log_func_t log_func = default_log_func;
23 void fuse_set_log_func(fuse_log_func_t func)
25 if (!func) {
26 func = default_log_func;
29 log_func = func;
32 void fuse_log(enum fuse_log_level level, const char *fmt, ...)
34 va_list ap;
36 va_start(ap, fmt);
37 log_func(level, fmt, ap);
38 va_end(ap);