From: Randy Dunlap <randy.dunlap@oracle.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch] add ignore_loglevel boot option
Date: Tue, 5 Dec 2006 14:47:09 -0800 [thread overview]
Message-ID: <20061205144709.9c50194d.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20061205120954.GA30154@elte.hu>
On Tue, 5 Dec 2006 13:09:54 +0100 Ingo Molnar wrote:
> Subject: [patch] add ignore_loglevel boot option
> From: Ingo Molnar <mingo@elte.hu>
>
> sometimes the kernel prints something interesting while userspace
> bootup keeps messages turned off via loglevel. Enable the printing
> of /all/ kernel messages via the "ignore_loglevel" boot option.
> Off by default.
Hi,
Is this equivalent to using the "debug" kernel parameter
except that userspace (init scripts) cannot muck it up (modify
the setting)?
I've seen init scripts modify the loglevel, much to my
dismay.
I'd say that this is useful, but it's really userspace
that needs to be fixed.
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> Documentation/kernel-parameters.txt | 4 ++++
> kernel/printk.c | 14 +++++++++++++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> Index: linux/kernel/printk.c
> ===================================================================
> --- linux.orig/kernel/printk.c
> +++ linux/kernel/printk.c
> @@ -352,13 +352,25 @@ static void __call_console_drivers(unsig
> touch_critical_timing();
> }
>
> +static int __read_mostly ignore_loglevel;
> +
> +int __init ignore_loglevel_setup(char *str)
> +{
> + ignore_loglevel = 1;
> + printk(KERN_INFO "debug: ignoring loglevel setting.\n");
> +
> + return 1;
> +}
> +
> +__setup("ignore_loglevel", ignore_loglevel_setup);
> +
> /*
> * Write out chars from start to end - 1 inclusive
> */
> static void _call_console_drivers(unsigned long start,
> unsigned long end, int msg_log_level)
> {
> - if (msg_log_level < console_loglevel &&
> + if ((msg_log_level < console_loglevel || ignore_loglevel) &&
> console_drivers && start != end) {
> if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
> /* wrapped write */
> -
---
~Randy
next prev parent reply other threads:[~2006-12-05 22:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-05 12:09 Ingo Molnar
2006-12-05 22:47 ` Randy Dunlap [this message]
2006-12-06 9:00 ` Ingo Molnar
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=20061205144709.9c50194d.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@osdl.org \
--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®