I'd like to see this enabled by config option.

Signed-off-by: Myles Watson <[EMAIL PROTECTED]>

and/or

Acked-by: Myles Watson <[EMAIL PROTECTED]>

If you want to resend it since you wrote it.

Thanks,
Myles

On 10/13/08, ron minnich <[EMAIL PROTECTED]> wrote:
>
> Myles, use this patch. Then send me output.
>
> ron
> Index: lib/console.c
> ===================================================================
> --- lib/console.c       (revision 920)
> +++ lib/console.c       (working copy)
> @@ -136,8 +136,14 @@
>                 return 0;
>         }
>
> +       console_tx_byte('<', (void *)0);
> +       console_tx_byte(msg_level + '0', (void *)0);
> +       console_tx_byte('>', (void *)0);
> +
> +       i = 3;
> +
>         va_start(args, fmt);
> -       i = vtxprintf(console_tx_byte, (void *)0, fmt, args);
> +       i += vtxprintf(console_tx_byte, (void *)0, fmt, args);
>         va_end(args);
>
>         return i;
>
Index: lib/Kconfig
===================================================================
--- lib/Kconfig	(revision 918)
+++ lib/Kconfig	(working copy)
@@ -68,6 +68,11 @@
 	help
 	  Support for various types of (debugging) consoles.
 
+config CONSOLE_PREPEND_LOG_LEVEL
+	boolean "Prepend log level to messages"
+	default n
+	depends CONSOLE
+
 choice
 	prompt "Console log level"
 	default CONSOLE_LOGLEVEL_8
Index: lib/console.c
===================================================================
--- lib/console.c	(revision 918)
+++ lib/console.c	(working copy)
@@ -132,12 +132,22 @@
 	va_list args;
 	int i;
 
+#ifdef CONFIG_CONSOLE_PREPEND_LOG_LEVEL
+	console_tx_byte('<', (void *)0);
+	console_tx_byte(msg_level + '0', (void *)0);
+	console_tx_byte('>', (void *)0);
+
+	i = 3;
+
 	if (msg_level > console_loglevel()) {
 		return 0;
 	}
+#else
+	i = 0;
+#endif
 
 	va_start(args, fmt);
-	i = vtxprintf(console_tx_byte, (void *)0, fmt, args);
+	i += vtxprintf(console_tx_byte, (void *)0, fmt, args);
 	va_end(args);
 
 	return i;
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to