mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Fix init environment code examples
Likely not updated after --kernel-cli-after-dash was added. Prompted by: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/120
This commit is contained in:
13
README.adoc
13
README.adoc
@@ -3130,10 +3130,16 @@ ____
|
||||
And you can try it out with:
|
||||
|
||||
....
|
||||
./run --kernel-cli 'init=/lkmc/linux/init_env_poweroff.out - asdf=qwer zxcv'
|
||||
./run --kernel-cli 'init=/lkmc/linux/init_env_poweroff.out' --kernel-cli-after-dash 'asdf=qwer zxcv'
|
||||
....
|
||||
|
||||
Output:
|
||||
From the <<dry-run,generated QEMU command>>, we see that the kernel CLI at LKMC 69f5745d3df11d5c741551009df86ea6c61a09cf now contains:
|
||||
|
||||
....
|
||||
init=/lkmc/linux/init_env_poweroff.out console=ttyS0 - lkmc_home=/lkmc asdf=qwer zxcv
|
||||
....
|
||||
|
||||
and the init program outputs:
|
||||
|
||||
....
|
||||
args:
|
||||
@@ -3144,6 +3150,7 @@ zxcv
|
||||
env:
|
||||
HOME=/
|
||||
TERM=linux
|
||||
lkmc_home=/lkmc
|
||||
asdf=qwer
|
||||
....
|
||||
|
||||
@@ -3156,7 +3163,7 @@ The annoying dash `-` gets passed as a parameter to `init`, which makes it impos
|
||||
Arguments with dots that come after `-` are still treated specially (of the form `subsystem.somevalue`) and disappear, from args, e.g.:
|
||||
|
||||
....
|
||||
./run --kernel-cli 'init=/lkmc/linux/init_env_poweroff.out - /lkmc/linux/poweroff.out'
|
||||
./run --kernel-cli 'init=/lkmc/linux/init_env_poweroff.out' --kernel-cli-after-dash '/lkmc/linux/poweroff.out'
|
||||
....
|
||||
|
||||
outputs:
|
||||
|
||||
Reference in New Issue
Block a user