From: Matt Mackall <mpm@selenic.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clean up kernel messages
Date: Fri, 1 Apr 2005 12:46:30 -0800 [thread overview]
Message-ID: <20050401204629.GJ15453@waste.org> (raw)
In-Reply-To: <20050401122641.7c52eaab.akpm@osdl.org>
On Fri, Apr 01, 2005 at 12:26:41PM -0800, Andrew Morton wrote:
> Matt Mackall <mpm@selenic.com> wrote:
> >
> > This patch tidies up those annoying kernel messages. A typical kernel
> > boot now looks like this:
> >
> > Loading Linux... Uncompressing kernel...
> > #
> >
> > See? Much nicer. This patch saves about 375k on my laptop config and
> > nearly 100k on minimal configs.
> >
>
> heh. Please take a look at
> http://www.uwsg.iu.edu/hypermail/linux/kernel/0004.2/0709.html, see if
> Graham did anything which you missed.
He's got a bunch of stuff that's not strictly related in there and
stuff I've already dealt with (vprintk and the like) and stuff that's
still forthcoming (panic tweaks, etc.). I also leave in all the APIs
like dmesg, they just no longer do anything.
> One problem was that
>
> printk("foo");
>
> will still cause the string "foo\0" to appear in the kernel image. That
> was fixed in later gcc's, but it would be interesting to know which
> compilers get it right.
Haven't encountered this. I think it should be fine for any compiler
that can handle 2.6. This has been in -tiny for nearly a year and a
half and no one's complained.
> > +static inline int printk(const char *s, ...) { return 0; }
>
> Actually printk() is supposed to return the number of chars which it
> printed. So if someone is doing:
>
> while (len < 40)
> len += printk("something");
>
> you've gone and made them lock up.
>
> But I think the number of places where we examine the printk return value
> is near zero.
Well in some sense 0 is the proper return but I suppose this could be
made to return 1. Small enough not break anything, big enough so that
things like the above get unstuck.
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2005-04-01 20:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-01 20:08 [PATCH] clean up kernel messages Matt Mackall
2005-04-01 20:26 ` Andrew Morton
2005-04-01 20:46 ` Matt Mackall [this message]
2005-04-01 21:18 ` Steven Rostedt
2005-04-01 21:26 ` Steven Rostedt
2005-04-01 22:08 ` Richard B. Johnson
2005-04-02 10:35 ` Denis Vlasenko
2005-04-01 21:32 ` Matt Mackall
2005-04-01 20:27 ` Jan-Benedict Glaw
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=20050401204629.GJ15453@waste.org \
--to=mpm@selenic.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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