mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
For kernel logging macro, pr_warning is completely removed and replaced by pr_warn, using pr_warn in tools lib api for symmetry to kernel logging macro, then we could drop pr_warning in the whole linux code. Changing __pr_warning to __pr_warn to be consistent. Link: http://lkml.kernel.org/r/[email protected] To: [email protected] Cc: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Kefeng Wang <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
30 lines
593 B
C
30 lines
593 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#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_warn = __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_warn = warn;
|
|
__pr_info = info;
|
|
__pr_debug = debug;
|
|
}
|