Yeah... that was stupid. Let's try again with a much smaller,
much improved version. Thanks for pointing out the obvious silliness in
the original patch.<br>
<br>
-b<br>
<br><br><div><span class="gmail_quote">On 10/31/06, <b class="gmail_sendername">B Thomas</b> <<a href="mailto:bjthomas3@gmail.com">bjthomas3@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey, you're probably correct. It was a long, twisty path before I got
to the final patch including many detours and changes of direction.
Let me rework it with the environment variables and resubmit.<br>
<br>
Thanks,<br><span class="sg">
-b</span><div><span class="e" id="q_10ea0c8dbbe7ec72_2"><br>
<br><br><div><span class="gmail_quote">On 10/31/06, <b class="gmail_sendername">Denis Vlasenko</b> <<a href="mailto:vda.linux@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vda.linux@googlemail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tuesday 31 October 2006 23:22, B Thomas wrote:<br>> Hi,<br>><br>> There are circumstances in which it would be great to allow the selection of<br>> different inittab file at boot time. This patch adds the ability to select
<br>> the inittab file via a command line option (bb_inittab).<br>><br>> One of the things that I don't like about this patch is the need to mount<br>> /proc on systems in which it isn't mounted. The mount is cleaned up and
<br>> handled carefully; I just don't like having to do it. Having said that,<br>> this patch has proven to be quite useful.<br>><br>> Signed-off-by: Ben Thomas (<a href="mailto:ben@virtualiron.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ben@virtualiron.com
</a>)<br><br>I thought that all unrecognized kernel params are passed in the environment<br>to init: kernel tree, init/main.c:<br><br>/*<br> * Unknown boot options get handed to init, unless they look like<br> * failed parameters
<br> */<br>static int __init unknown_bootoption(char *param, char *val)<br>{<br>....<br> if (val) {<br> /* Environment option */<br> unsigned int i;<br> for (i = 0; envp_init[i]; i++) {
<br> if
(i == MAX_INIT_ENVS) {<br> panic_later = "Too many boot env vars at `%s'";<br> panic_param = param;<br> }
<br> if
(!strncmp(param, envp_init[i], val - param))<br> break;<br> }<br>....<br><br>So you do not need to parse /proc/commandline<br>--<br>vda<br></blockquote>
</div><br>
</span></div></blockquote></div><br>