summaryrefslogtreecommitdiffstats
path: root/tests/stubs/console.c
blob: 14b3e7105648ec4b5a154a9eae79ca974097dc64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* SPDX-License-Identifier: GPL-2.0-only */

#include <console/console.h>
#include <stdarg.h>
#include <stdio.h>
#include <tests/test.h>

#ifndef TEST_PRINT
#define TEST_PRINT 0
#endif

int printk(int msg_level, const char *fmt, ...)
{
#if TEST_PRINT
	va_list v;
	va_start(v, fmt);
	vprint_message(fmt, v);
	va_end(v);
#endif
	return 0;
}

int vprintk(int msg_level, const char *fmt, va_list args)
{
#if TEST_PRINT
	vprint_message(fmt, args);
#endif
	return 0;
}

int console_log_level(int msg_level)
{
	return 0;
}