On Wednesday 04 July 2007 20:58, Harald Küthe wrote:
> > Try this: in init.c, add "else" clause as shown below:
> > 
> > static void console_init(void)
> > {
> >         struct serial_struct sr;
> >         char *s;
> > 
> >         s = getenv("CONSOLE");
> >         if (!s) s = getenv("console");
> >         if (s) {
> >                 int fd = open(s, O_RDWR | O_NONBLOCK | O_NOCTTY);
> >                 if (fd >= 0) {
> >                         dup2(fd, 0);
> >                         dup2(fd, 1);
> >                         dup2(fd, 2);
> >                         while (fd > 2) close(fd--);
> >                 }
> >                 messageD(L_LOG, "console='%s'", s);
> > +        } else {
> > +               /* Make sure fd 0,1,2 are not closed */
> > +               bb_sanitize_stdio();
> >         }
> > 
> > If it helps, I will add it in 1.6.2.
> > --
> > vda
> 
> This works, thank you for your help.
> I found out that in kernel 2.4.34 the kernel commandline argument
> "console=" is processed by the kernel itsself and therefore not
> transferred into the environment.  
> So getenv("CONSOLE"); and getenv("console"); always return null. 

CONSOLE (uppercase) should still be passed by kernel.

Adding this to 1.6.1 fixes.

Hmmm... and 1.6.1 announcement is still not on webpage - ?!
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to