[patch] Don't assume arguments to init have no period in them.

From: Rob Landley
Date: Thu Feb 22 2007 - 14:40:56 EST


Signed-off-by: Rob Landley <rob@xxxxxxxxxxx>

The kernel assumes that nobody will ever legitimately feed in a kernel command
line option with a period in it, and the kernel is wrong: I'm feeding the
path to a script as an argument to my init program, the name of the script
ends in .sh.

I've been using this patch ever since 2.6.13, and I still need it.

--- linux-old/init/main.c 2005-09-09 21:42:58.000000000 -0500
+++ linux-new/init/main.c 2005-10-24 02:07:37.683498720 -0500
@@ -242,15 +242,6 @@
if (obsolete_checksetup(param))
return 0;

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

--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/