public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <Yinghai.Lu@Sun.COM>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] make loglevel related commandline to early_param
Date: Fri, 01 Feb 2008 02:40:37 -0800	[thread overview]
Message-ID: <200802010240.37799.yinghai.lu@sun.com> (raw)

[PATCH] make loglevel related command_line to early_param

so we can use them for early console like console=uart8250 or earlycon=uart8250 or early_printk

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

diff --git a/init/main.c b/init/main.c
index cb81ed1..a774a93 100644
--- a/init/main.c
+++ b/init/main.c
@@ -232,22 +232,18 @@ EXPORT_SYMBOL(loops_per_jiffy);
 
 static int __init debug_kernel(char *str)
 {
-	if (*str)
-		return 0;
 	console_loglevel = 10;
 	return 1;
 }
 
 static int __init quiet_kernel(char *str)
 {
-	if (*str)
-		return 0;
 	console_loglevel = 4;
 	return 1;
 }
 
-__setup("debug", debug_kernel);
-__setup("quiet", quiet_kernel);
+early_param("debug", debug_kernel);
+early_param("quiet", quiet_kernel);
 
 static int __init loglevel(char *str)
 {
@@ -255,7 +251,7 @@ static int __init loglevel(char *str)
 	return 1;
 }
 
-__setup("loglevel=", loglevel);
+early_param("loglevel", loglevel);
 
 /*
  * Unknown boot options get handed to init, unless they look like
diff --git a/kernel/printk.c b/kernel/printk.c
index 58bbec6..8c25e37 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -458,7 +458,7 @@ static int __init ignore_loglevel_setup(char *str)
 	return 1;
 }
 
-__setup("ignore_loglevel", ignore_loglevel_setup);
+early_param("ignore_loglevel", ignore_loglevel_setup);
 
 /*
  * Write out chars from start to end - 1 inclusive

             reply	other threads:[~2008-02-01 10:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 10:40 Yinghai Lu [this message]
2008-02-01 12:39 ` [PATCH] make loglevel related commandline to early_param Andi Kleen
2008-02-01 18:51   ` Yinghai Lu
2008-02-01 19:35   ` [PATCH] make loglevel related commandline to early_param v2 Yinghai Lu
2008-02-01 19:56     ` Andrew Morton
2008-02-01 20:21       ` Yinghai Lu

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=200802010240.37799.yinghai.lu@sun.com \
    --to=yinghai.lu@sun.com \
    --cc=akpm@linux-foundation.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