Skip to content

Commit

Permalink
param: don't complain about unused module parameters.
Browse files Browse the repository at this point in the history
Jon confirms that recent modprobe will look in /proc/cmdline, so these
cmdline options can still be used.

See http://bugzilla.kernel.org/show_bug.cgi?id=14164

Reported-by: Adam Williamson <awilliam@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
rustyrussell authored and torvalds committed Dec 2, 2009
1 parent 86a7b7e commit f066a4f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions init/main.c
Expand Up @@ -251,7 +251,7 @@ early_param("loglevel", loglevel);

/*
* Unknown boot options get handed to init, unless they look like
* failed parameters
* unused parameters (modprobe will find them in /proc/cmdline).
*/
static int __init unknown_bootoption(char *param, char *val)
{
Expand All @@ -272,14 +272,9 @@ static int __init unknown_bootoption(char *param, char *val)
if (obsolete_checksetup(param))
return 0;

/*
* Preemptive maintenance for "why didn't my misspelled command
* line work?"
*/
if (strchr(param, '.') && (!val || strchr(param, '.') < val)) {
printk(KERN_ERR "Unknown boot option `%s': ignoring\n", param);
/* Unused module parameter. */
if (strchr(param, '.') && (!val || strchr(param, '.') < val))
return 0;
}

if (panic_later)
return 0;
Expand Down

0 comments on commit f066a4f

Please sign in to comment.