mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 07:40:53 +07:00
c405c37bd9
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/20191018031850.48498-30-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
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;
|
|
}
|