Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b41046c authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Linus Torvalds
Browse files

[PATCH] Don't pass boot parameters to argv_init[]



The boot cmdline is parsed in parse_early_param() and
parse_args(,unknown_bootoption).

And __setup() is used in obsolete_checksetup().

	start_kernel()
		-> parse_args()
			-> unknown_bootoption()
				-> obsolete_checksetup()

If __setup()'s callback (->setup_func()) returns 1 in
obsolete_checksetup(), obsolete_checksetup() thinks a parameter was
handled.

If ->setup_func() returns 0, obsolete_checksetup() tries other
->setup_func().  If all ->setup_func() that matched a parameter returns 0,
a parameter is seted to argv_init[].

Then, when runing /sbin/init or init=app, argv_init[] is passed to the app.
If the app doesn't ignore those arguments, it will warning and exit.

This patch fixes a wrong usage of it, however fixes obvious one only.

Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 68eef3b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ marvel_specify_io7(char *str)
		str = pchar;
	} while(*str);

	return 0;
	return 1;
}
__setup("io7=", marvel_specify_io7);

+1 −1
Original line number Diff line number Diff line
@@ -752,7 +752,7 @@ static int __init apic_set_verbosity(char *str)
		printk(KERN_WARNING "APIC Verbosity level %s not recognised"
				" use apic=verbose or apic=debug\n", str);

	return 0;
	return 1;
}

__setup("apic=", apic_set_verbosity);
+2 −2
Original line number Diff line number Diff line
@@ -64,13 +64,13 @@ void mcheck_init(struct cpuinfo_x86 *c)
static int __init mcheck_disable(char *str)
{
	mce_disabled = 1;
	return 0;
	return 1;
}

static int __init mcheck_enable(char *str)
{
	mce_disabled = -1;
	return 0;
	return 1;
}

__setup("nomce", mcheck_disable);
+1 −1
Original line number Diff line number Diff line
@@ -644,7 +644,7 @@ static int __init balanced_irq_init(void)
int __init irqbalance_disable(char *str)
{
	irqbalance_disabled = 1;
	return 0;
	return 1;
}

__setup("noirqbalance", irqbalance_disable);
+1 −1
Original line number Diff line number Diff line
@@ -1193,6 +1193,6 @@ void __init trap_init(void)
static int __init kstack_setup(char *s)
{
	kstack_depth_to_print = simple_strtoul(s, NULL, 0);
	return 0;
	return 1;
}
__setup("kstack=", kstack_setup);
Loading