1 // SPDX-License-Identifier: GPL-2.0 << 2 #include <stdio.h> 1 #include <stdio.h> 3 #include <stdarg.h> 2 #include <stdarg.h> 4 #include "debug.h" 3 #include "debug.h" 5 #include "debug-internal.h" 4 #include "debug-internal.h" 6 5 7 static int __base_pr(const char *format, ...) 6 static int __base_pr(const char *format, ...) 8 { 7 { 9 va_list args; 8 va_list args; 10 int err; 9 int err; 11 10 12 va_start(args, format); 11 va_start(args, format); 13 err = vfprintf(stderr, format, args); 12 err = vfprintf(stderr, format, args); 14 va_end(args); 13 va_end(args); 15 return err; 14 return err; 16 } 15 } 17 16 18 libapi_print_fn_t __pr_warn = __base_pr; !! 17 libapi_print_fn_t __pr_warning = __base_pr; 19 libapi_print_fn_t __pr_info = __base_pr; 18 libapi_print_fn_t __pr_info = __base_pr; 20 libapi_print_fn_t __pr_debug; 19 libapi_print_fn_t __pr_debug; 21 20 22 void libapi_set_print(libapi_print_fn_t warn, 21 void libapi_set_print(libapi_print_fn_t warn, 23 libapi_print_fn_t info, 22 libapi_print_fn_t info, 24 libapi_print_fn_t debug) 23 libapi_print_fn_t debug) 25 { 24 { 26 __pr_warn = warn; !! 25 __pr_warning = warn; 27 __pr_info = info; 26 __pr_info = info; 28 __pr_debug = debug; 27 __pr_debug = debug; 29 } 28 } 30 29
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.