]> git.karo-electronics.de Git - karo-tx-linux.git/commit
init: fix bug where environment vars can't be passed via boot args
authorChris Metcalf <cmetcalf@tilera.com>
Fri, 6 Apr 2012 16:53:50 +0000 (12:53 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Thu, 12 Apr 2012 16:38:30 +0000 (12:38 -0400)
commit32d79c6dd90ea08863fb88b522ada5054d876acd
treee8666ecaa86f9ccac77bb8be672ca7e9f55cced4
parent6fffeba4a7db38e79ca4264b61b219da36c8cee4
init: fix bug where environment vars can't be passed via boot args

Commit 026cee0086f had the side-effect of dropping the '=' from
the unknown boot arguments that are passed to init as environment
variables.  This is because parse_args() puts a NUL in the string
where the '=' was when it passes the "param" and "val" pointers
to the parsing subfunctions.  Previously, unknown_bootoption() was
the last parse_args() subfunction to run, and it carefully put back
the '=' character.  Now the ignore_unknown_bootoption() is the last
one to run, and it wasn't doing the necessary repair, so the
envp params ended up with the embedded NUL and were no longer
seen as valid environment variables by init.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
init/main.c