]> git.baikalelectronics.ru Git - kernel.git/commit
param: hand arguments after -- straight to init
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 28 Apr 2014 02:04:33 +0000 (11:34 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 28 Apr 2014 02:18:34 +0000 (11:48 +0930)
commitda8782694acb0a9d8b6a7f08e6d26a783a4125b7
tree579ef4259a17200a77ec111c6a6ca082d43a368d
parentb86dca7c443fb237ec5cfe0bf22fb2a95c232b84
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>
include/linux/moduleparam.h
init/main.c
kernel/module.c
kernel/params.c