From 4d52c1b047f4f7a03511f1c3c4b15007d16e6ca7 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 8 Mar 2007 13:28:54 +0000 Subject: [PATCH] Do not print the "(LB) " for the first line of LinuxBIOS output (looks ugly because there are two \n\n before the "LinuxBIOS-3.0.0". MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some cosmetic fixeѕ (trivial). Signed-off-by: Uwe Hermann Acked-by: Uwe Hermann git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@212 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/console.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/console.c b/arch/x86/console.c index 71dcbf5f91..bd20954469 100644 --- a/arch/x86/console.c +++ b/arch/x86/console.c @@ -6,7 +6,8 @@ // FIXME: we need this for varargs #include -extern int vtxprintf(void (*)(unsigned char, void *arg), void *arg, const char *, va_list); +extern int vtxprintf(void (*)(unsigned char, void *arg), void *arg, + const char *, va_list); int console_loglevel(void) { @@ -40,7 +41,8 @@ int printk(int msg_level, const char *fmt, ...) void console_init(void) { - static const char console_test[] = + va_list args; + static const char console_test[] = "\n\nLinuxBIOS-" LINUXBIOS_VERSION LINUXBIOS_EXTRA_VERSION @@ -48,13 +50,16 @@ void console_init(void) LINUXBIOS_BUILD " starting...\n"; - printk(BIOS_INFO, console_test); + /* We don't use printk() directly here in order to avoid printing + the "(LB) " in the first line of LinuxBIOS output. */ + if (BIOS_INFO < console_loglevel()) + vtxprintf(console_tx_byte, (void *)0, console_test, args); } void die(const char *str) { - printk(BIOS_EMERG,str); + printk(BIOS_EMERG, str); do { hlt(); - } while(1); + } while (1); }