summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 14:33:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 14:33:37 -0700
commiteb1574270a6de8fb8d31ffc3b021e30df0afcda3 (patch)
treed154ba369f222f5108ed1a2462d815d7faadc2e5 /init
parentaac10aaa8cc65a6fef6f5bc7d0b96035b0225a61 (diff)
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
Merge 3.4-rc5 into driver-core-next
This was done to resolve a merge issue with the init/main.c file. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/init/main.c b/init/main.c
index 11bc6f7ed86..92c47c4dbde 100644
--- a/init/main.c
+++ b/init/main.c
@@ -225,14 +225,9 @@ static int __init loglevel(char *str)
early_param("loglevel", loglevel);
-/*
- * Unknown boot options get handed to init, unless they look like
- * unused parameters (modprobe will find them in /proc/cmdline).
- */
-static int __init unknown_bootoption(char *param, char *val,
- const char *unused)
+/* Change NUL term back to "=", to make "param" the whole string. */
+static int __init repair_env_string(char *param, char *val, const char *unused)
{
- /* Change NUL term back to "=", to make "param" the whole string. */
if (val) {
/* param=val or param="val"? */
if (val == param+strlen(param)+1)
@@ -244,6 +239,16 @@ static int __init unknown_bootoption(char *param, char *val,
} else
BUG();
}
+ return 0;
+}
+
+/*
+ * Unknown boot options get handed to init, unless they look like
+ * unused parameters (modprobe will find them in /proc/cmdline).
+ */
+static int __init unknown_bootoption(char *param, char *val, const char *unused)
+{
+ repair_env_string(param, val, unused);
/* Handle obsolete-style parameters */
if (obsolete_checksetup(param))
@@ -733,12 +738,6 @@ static char *initcall_level_names[] __initdata = {
"late",
};
-static int __init ignore_unknown_bootoption(char *param, char *val,
- const char *doing)
-{
- return 0;
-}
-
static void __init do_initcall_level(int level)
{
extern const struct kernel_param __start___param[], __stop___param[];
@@ -749,7 +748,7 @@ static void __init do_initcall_level(int level)
static_command_line, __start___param,
__stop___param - __start___param,
level, level,
- &ignore_unknown_bootoption);
+ &repair_env_string);
for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++)
do_one_initcall(*fn);