[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] - allow specification of alternate inittab files
From: "B Thomas" <bjthomas3 () gmail ! com>
Date: 2006-10-31 23:51:27
Message-ID: a8a6bd980610311551o6d258aa0gdfc2cc6d1a159c45 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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.
Thanks,
-b
On 10/31/06, Denis Vlasenko <vda.linux@googlemail.com> wrote:
>
> On Tuesday 31 October 2006 23:22, B Thomas wrote:
> > Hi,
> >
> > There are circumstances in which it would be great to allow the
> selection of
> > different inittab file at boot time. This patch adds the ability to
> select
> > the inittab file via a command line option (bb_inittab).
> >
> > One of the things that I don't like about this patch is the need to
> mount
> > /proc on systems in which it isn't mounted. The mount is cleaned up and
> > handled carefully; I just don't like having to do it. Having said that,
> > this patch has proven to be quite useful.
> >
> > Signed-off-by: Ben Thomas (ben@virtualiron.com)
>
> I thought that all unrecognized kernel params are passed in the
> environment
> to init: kernel tree, init/main.c:
>
> /*
> * Unknown boot options get handed to init, unless they look like
> * failed parameters
> */
> static int __init unknown_bootoption(char *param, char *val)
> {
> ....
> if (val) {
> /* Environment option */
> unsigned int i;
> for (i = 0; envp_init[i]; i++) {
> if (i == MAX_INIT_ENVS) {
> panic_later = "Too many boot env vars at
> `%s'";
> panic_param = param;
> }
> if (!strncmp(param, envp_init[i], val - param))
> break;
> }
> ....
>
> So you do not need to parse /proc/commandline
> --
> vda
>
[Attachment #5 (text/html)]
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>
-b<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">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">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> &nb \
sp; panic_later \
= "Too many boot env vars at \
`%s'";<br>   \
; panic_param \
= param;<br> }
<br> if \
(!strncmp(param, envp_init[i], val - \
param))<br> &nb \
sp;   \
; break;<br> }<br>....<br><br>So \
you do not need to parse /proc/commandline<br>--<br>vda<br></blockquote> </div><br>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic