xref: /aosp_15_r20/external/coreboot/tests/stubs/console.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/console.h>
4 #include <stdarg.h>
5 #include <stdio.h>
6 #include <tests/test.h>
7 
8 #ifndef TEST_PRINT
9 #define TEST_PRINT 0
10 #endif
11 
printk(int msg_level,const char * fmt,...)12 int printk(int msg_level, const char *fmt, ...)
13 {
14 #if TEST_PRINT
15 	va_list v;
16 	va_start(v, fmt);
17 	vprint_message(fmt, v);
18 	va_end(v);
19 #endif
20 	return 0;
21 }
22 
vprintk(int msg_level,const char * fmt,va_list args)23 int vprintk(int msg_level, const char *fmt, va_list args)
24 {
25 #if TEST_PRINT
26 	vprint_message(fmt, args);
27 #endif
28 	return 0;
29 }
30 
console_log_level(int msg_level)31 int console_log_level(int msg_level)
32 {
33 	return 0;
34 }
35