diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-09 02:08:02 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-09 02:08:02 +0300 |
commit | 4b42fafc1cdc4aba38d4f147cb2f3f1a32cd4a15 (patch) | |
tree | 7f162d0612f7048dc52a3ba320a6685593100729 /tools/lib/api/debug.c | |
parent | b318556479cc923970a79d6c2311138581c0db83 (diff) | |
parent | 6c9d9c81924b4b63c7a487e90fddb3b2d0f7d458 (diff) | |
download | linux-4b42fafc1cdc4aba38d4f147cb2f3f1a32cd4a15.tar.xz |
Merge branch 'pm-cpufreq-sched' into pm-cpufreq
Diffstat (limited to 'tools/lib/api/debug.c')
-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; +} |