public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Verych <olecom@flower.upol.cz>
To: Jan Engelhardt <jengelh@computergmbh.de>, Ingo Molnar <mingo@elte.hu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Cute feature: colored printk output
Date: Sat, 6 Oct 2007 20:09:31 +0200	[thread overview]
Message-ID: <E1IeE5j-0005a6-10@flower> (raw)
In-Reply-To: <20071006110835.GA24463@elte.hu>

* Sat, 6 Oct 2007 13:08:35 +0200

> * Jan Engelhardt <jengelh@computergmbh.de> wrote:
>
>> Colored kernel message output
>> 
>> Let's work more on Linux's cuteness! 
>> [http://lkml.org/lkml/2007/10/4/431] The following patch makes it 
>> possible to give kernel messages a selectable color

Only boot time selectable? Then write so, please.

>> which helps to distinguish it from other noise, such as boot messages.
>> NetBSD has it, OpenBSD has it, FreeBSD to some extent, so I think
>> Linux should too.

This approach in GIGO-like, IMHO. Ugliness of (default) boot process
messaging itself can and must be solved in the userspace. I don't know if
anybody read sub-thread about size reduction by moving static printk
string to userspace "message codes" (there were one more person than me,
but still).

The main problem, is the very narrow perspective of such "kernel"
functionality:

> feature request: would be interesting to have a color table (defined in 
> the .config) dependent on message loglevel. That way KERN_CRIT messages 
> could be red, KERN_INFO ones white, etc.
>
> 	Ingo

See? In the userspace one can make anything freely, try do it in the
Linux kernel. With userspace {codes, messages} -> messages tool, any
console printing frontend is possible. Of course, when kernel OOPes
before or in early userspace, where nothing other than photo viva is
possible, nobody should care about "Linux's cuteness!"

>> Inspired by cko (http://freshmeat.net/p/cko/), but independently
>> written, later contributed forth and back.
>> 
>> Already posted at: http://lkml.org/lkml/2007/4/1/162
>> 
>> Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
>
> looks really good to me!
>
> Reviewed-by: Ingo Molnar <mingo@elte.hu>
>
> small nit:
>
> +       vc->vc_color = printk_color;
> +       update_attr(vc);
>
> that should be in a set_vc_color() function and the new code should do:
>
> +	set_vc_color(vc, vc->vc_color);
>
> (and same at the other places that call update_attr() as well)

Is it possible to have a macro for this, which will be
`do { } while(0)' in case of "NO, thanks" configuration?

--
-o--=O`C
 #oo'L O
<___=E M

  parent reply	other threads:[~2007-10-06 17:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 19:13 [PATCH] Cute feature: colored printk output Jan Engelhardt
2007-10-05 19:19 ` Lennart Sorensen
2007-10-05 19:21   ` Jan Engelhardt
2007-10-05 19:24     ` Lennart Sorensen
2007-10-05 19:32       ` Jan Engelhardt
2007-10-05 19:43         ` Lennart Sorensen
2007-10-05 19:55           ` Jan Engelhardt
2007-10-05 20:23 ` Medve Emilian-EMMEDVE1
2007-10-05 23:22 ` Krzysztof Halasa
2007-10-05 23:47   ` Jan Engelhardt
2007-10-06  0:10     ` Krzysztof Halasa
2007-10-06  0:23       ` Jan Engelhardt
2007-10-06  0:26         ` Jan Engelhardt
2007-10-06 11:58           ` Krzysztof Halasa
2007-10-06 11:08 ` Ingo Molnar
2007-10-06 17:16   ` Dave Jones
2007-10-06 18:09   ` Oleg Verych [this message]
2007-10-06 19:53 ` Bill Davidsen
2007-10-06 20:01   ` Jan Engelhardt
2007-10-07  0:50     ` Bill Davidsen
2007-10-07  8:42       ` Jan Engelhardt
2007-10-06 21:19 ` Miguel Botón

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1IeE5j-0005a6-10@flower \
    --to=olecom@flower.upol.cz \
    --cc=akpm@linux-foundation.org \
    --cc=jengelh@computergmbh.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox