From: Oleg Verych <olecom@flower.upol.cz>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 2/2] Colored kernel output (run3)
Date: Sat, 6 Oct 2007 23:25:38 +0200 [thread overview]
Message-ID: <20071006212538.GH22435@flower.upol.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0710062209530.20637@fbirervta.pbzchgretzou.qr>
Thanks for dealing with my acidness in the first patch :)
But what about this one?
On Sat, Oct 06, 2007 at 10:10:01PM +0200, Jan Engelhardt wrote:
>
> Colored kernel message output (2/2)
>
> By popular request, this patch adds per-loglevel coloring.
> The user may set values using vt.printk_color= or by modifying
> the sysfs file in the running system.
>
> Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
>
> ---
> arch/x86_64/kernel/early_printk.c | 11 +++++++----
> drivers/char/Kconfig | 4 +++-
> drivers/char/vt.c | 32 ++++++++++++++++++++++++--------
> drivers/net/netconsole.c | 3 ++-
> drivers/serial/8250.c | 3 ++-
> drivers/serial/8250_early.c | 3 ++-
> include/linux/console.h | 2 +-
> kernel/printk.c | 12 +++++++-----
> 8 files changed, 48 insertions(+), 22 deletions(-)
Making this amount changes and not thinking about more intelligent
coding of the functionality?
> Index: linux-2.6.23/arch/x86_64/kernel/early_printk.c
> ===================================================================
> --- linux-2.6.23.orig/arch/x86_64/kernel/early_printk.c
> +++ linux-2.6.23/arch/x86_64/kernel/early_printk.c
> @@ -20,7 +20,8 @@
> static int max_ypos = 25, max_xpos = 80;
> static int current_ypos = 25, current_xpos = 0;
>
> -static void early_vga_write(struct console *con, const char *str, unsigned n)
> +static void early_vga_write(struct console *con, const char *str, unsigned n,
> + unsigned int loglevel)
> {
I mean, *write() have nothing to do with loglevels. If they do
(suddenly), then why not to use a char in the *str to make it possible? I
might be wrong, but there are already macros before format strings in
printk().
And this is not `loglevel' thing any more. It's attributes, which can be
used by many other drivers/file systems/schedulers/ what ever, if
developers, like Ingo, will extend printk() output to be more nice in
subsystems they develop.
So, maybe they can be extended, and functionality implemented in the
function bodies (which will be `do { } while (0)' if config is NO), but
*NOT* by passing additional argument to the functions.
___
next prev parent reply other threads:[~2007-10-06 21:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.64.0710062147370.20637@fbirervta.pbzchgretzou.qr>
2007-10-06 20:09 ` [PATCH 1/2] " Jan Engelhardt
2007-10-06 22:52 ` Alan Cox
2007-10-07 16:38 ` Ingo Molnar
2007-10-07 16:44 ` Jan Engelhardt
2007-10-07 16:44 ` Ingo Molnar
2007-10-07 16:54 ` Jan Engelhardt
2007-10-07 16:59 ` Ingo Molnar
2007-10-07 17:03 ` Jan Engelhardt
2007-10-07 17:08 ` Ingo Molnar
2007-10-08 23:12 ` Antonino A. Daplas
2007-10-08 23:31 ` Jan Engelhardt
2007-10-08 23:53 ` Antonino A. Daplas
2007-10-09 21:36 ` Bill Davidsen
2007-10-06 20:10 ` [PATCH 2/2] " Jan Engelhardt
2007-10-06 21:25 ` Oleg Verych [this message]
2007-10-06 21:27 ` Jan Engelhardt
2007-10-06 22:28 ` On text size and run time if config is "n", " Oleg Verych
2007-10-06 22:20 ` Jan Engelhardt
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=20071006212538.GH22435@flower.upol.cz \
--to=olecom@flower.upol.cz \
--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
all inboxes | Powered by JetHome®