Kernel eats argument=
Hello!
I wanted to have 'cprofile=a_profile" specified to my init system. Now after some hours of debugging I see that everything that is in the form of
bla=blub
is eaten by the kernel and _not_ given to init.
Is that how it should be or is that a bug?
If it's how it should be, I'll switch to "cprofile:a_profile" or will Linux eat that, too?
The most mysterious thing (for me) is that /proc/cmdline contains that stuff again.
Nico, somehow confused
Signature · 3 lines
Keep it simple & stupid, use what's available. Please use pgp encryption: 8D0E 27A4 is my id. http://nico.schotteli.us | http://linux.schottelius.org
Quoted 8 lines · Nico Schottelius
I wanted to have 'cprofile=a_profile" specified to my init system. Now after some hours of debugging I see that everything that is in the form of
bla=blub
is eaten by the kernel and _not_ given to init. Is that how it should be or is that a bug?
Well, everything the kernel doesn't understand as a parameter (eg. for modules) actually *is* passed to init, but not as command-line arguments, but as environment variables. You'll probably find that :-)
MfG, JBG
PS: Not including sender's email address in Cc because I'm too lame to ACK my email for his email system...
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Quoted 1 line
[Does the kernel eat arguments?]
Found the answer myself:
init/main.c:
/*
* Unknown boot options get handed to init, unless they look like
* failed parameters
*/
static int __init unknown_bootoption(char *param, char *val)
Yes, it does and I'll have to use a different string.
Have a nice day,
Nico
Quoted 11 lines · Nico Schottelius
Hello!
I wanted to have 'cprofile=a_profile" specified to my init system. Now after some hours of debugging I see that everything that is in the form of
bla=blub
is eaten by the kernel and _not_ given to init.
Is that how it should be or is that a bug?
Quoted 8 lines
If it's how it should be, I'll switch to "cprofile:a_profile" or will Linux eat that, too?
The most mysterious thing (for me) is that
/proc/cmdlinecontains that stuff again.Nico, somehow confused
Init gets a single parameter 'auto'. Variables not understood by the kernel get put into the environment....