console: Allow using vprintk() with disabled console
The prototype of vprintk() is currently declared unconditionally, which prevents it from being used in situations where the console is disabled. The code will compile correctly, but not link, since the definition in console.c isn't being provided. This adds a shim around the declaration so that, like printk(), a call to vprintk() in this situation will expand to a no-op function instead. Change-Id: Ib4a9aa96a5b9dbb9b937ff45854bf6a407938b37 Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33181 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Patrick Georgi
parent
913437e8a2
commit
deb99af8a1
@ -45,7 +45,7 @@ static void wrap_putchar_cbmemc(unsigned char byte, void *data)
|
||||
__cbmemc_tx_byte(byte);
|
||||
}
|
||||
|
||||
int vprintk(int msg_level, const char *fmt, va_list args)
|
||||
int do_vprintk(int msg_level, const char *fmt, va_list args)
|
||||
{
|
||||
int i, log_this;
|
||||
|
||||
@ -91,7 +91,7 @@ int do_printk(int msg_level, const char *fmt, ...)
|
||||
int i;
|
||||
|
||||
va_start(args, fmt);
|
||||
i = vprintk(msg_level, fmt, args);
|
||||
i = do_vprintk(msg_level, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return i;
|
||||
|
Reference in New Issue
Block a user