[BusyBox] init patch

Erik Andersen andersen at codepoet.org
Tue Jul 2 23:46:03 UTC 2002


On Thu Jun 27, 2002 at 07:42:17PM +0400, Vladimir N. Oleynik wrote:
> rich_wilson,
> 
>  
> > I've found that init has a problem with certain commands, at least on ppc.
> > The failing line for me is:
> > 
> > ::respawn:/bin/sh -i -s </dev/ttyS0 >/dev/ttyS0 2>/dev/ttyS0
> 
> You right. I already found this, see:
> http://www.busybox.net/lists/busybox/2002-June/011743.html
> 
> I think, may be simplify for code size:
> 
> -                         strcpy(buf, "exec ");
> > -                       safe_strncpy(buf + sizeof("exec "), a->command,
> > -                                       sizeof(buf) - sizeof("exec "));
> 
> snprintf(buf, sizeof(buf), "exec %s", a->command);

yup.  I don't know how this one has lasted so long.  
Applied thanks vodz,

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the busybox mailing list