diff options
author | 2016-03-29 21:53:03 +0000 | |
---|---|---|
committer | 2016-03-29 21:53:03 +0000 | |
commit | 16b02d711f4059b8338ef967064195b47cae65ea (patch) | |
tree | 6d3e0b7629210b56f8d6cfa39184c878d8a15367 /tools/lib/api/debug.c | |
parent | sched/preempt, sh: kmap_coherent relies on disabled preemption (diff) | |
parent | Linux 4.6-rc1 (diff) | |
download | wireguard-linux-16b02d711f4059b8338ef967064195b47cae65ea.tar.xz wireguard-linux-16b02d711f4059b8338ef967064195b47cae65ea.zip |
Merge tag 'v4.6-rc1'
Linux 4.6-rc1
Diffstat (limited to '')
-rw-r--r-- | tools/lib/api/debug.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/lib/api/debug.c b/tools/lib/api/debug.c new file mode 100644 index 000000000000..5fa5cf500a1f --- /dev/null +++ b/tools/lib/api/debug.c @@ -0,0 +1,28 @@ +#include <stdio.h> +#include <stdarg.h> +#include "debug.h" +#include "debug-internal.h" + +static int __base_pr(const char *format, ...) +{ + va_list args; + int err; + + va_start(args, format); + err = vfprintf(stderr, format, args); + va_end(args); + return err; +} + +libapi_print_fn_t __pr_warning = __base_pr; +libapi_print_fn_t __pr_info = __base_pr; +libapi_print_fn_t __pr_debug; + +void libapi_set_print(libapi_print_fn_t warn, + libapi_print_fn_t info, + libapi_print_fn_t debug) +{ + __pr_warning = warn; + __pr_info = info; + __pr_debug = debug; +} |