diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-04-27 22:04:33 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-04-27 22:18:34 -0400 |
commit | 51e158c12aca3c9ac63988611a97c05109b14dc9 (patch) | |
tree | 579ef4259a17200a77ec111c6a6ca082d43a368d /include/linux/moduleparam.h | |
parent | 2ee41e62ba5b952e9d9fcba6f7079a0c608bb849 (diff) |
param: hand arguments after -- straight to init
The kernel passes any args it doesn't need through to init, except it
assumes anything containing '.' belongs to the kernel (for a module).
This change means all users can clearly distinguish which arguments
are for init.
For example, the kernel uses debug ("dee-bug") to mean log everything to
the console, where systemd uses the debug from the Scandinavian "day-boog"
meaning "fail to boot". If a future versions uses argv[] instead of
reading /proc/cmdline, this confusion will be avoided.
eg: test 'FOO="this is --foo"' -- 'systemd.debug="true true true"'
Gives:
argv[0] = '/debug-init'
argv[1] = 'test'
argv[2] = 'systemd.debug=true true true'
envp[0] = 'HOME=/'
envp[1] = 'TERM=linux'
envp[2] = 'FOO=this is --foo'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r-- | include/linux/moduleparam.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 204a67743804..b1990c5524e1 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -321,7 +321,7 @@ extern bool parameq(const char *name1, const char *name2); | |||
321 | extern bool parameqn(const char *name1, const char *name2, size_t n); | 321 | extern bool parameqn(const char *name1, const char *name2, size_t n); |
322 | 322 | ||
323 | /* Called on module insert or kernel boot */ | 323 | /* Called on module insert or kernel boot */ |
324 | extern int parse_args(const char *name, | 324 | extern char *parse_args(const char *name, |
325 | char *args, | 325 | char *args, |
326 | const struct kernel_param *params, | 326 | const struct kernel_param *params, |
327 | unsigned num, | 327 | unsigned num, |