I wrote a little patch which adds the option not to wipe the arguments, but
the result is a little bit odd, some 0 are inserted between "init" and the
rest of the arguments. I must be because "/bin/init" is replaced with
"init".
So the proper patch should either :
 * inhibit this argv[0] modification too
 * perform a memmove to wipe those extra zeros

Which one do you think is best ?

@isaac: sorry for the double mail

2016-02-01 7:56 GMT+01:00 Isaac Dunham <ibid...@gmail.com>:

> On Mon, Feb 01, 2016 at 12:21:00AM -0500, Mike Frysinger wrote:
> > On 29 Jan 2016 21:10, Laurent Bercot wrote:
> > > On 29/01/2016 17:50, Nicolas CARRIER wrote:
> > > > I quite agree with dietmar, concerning uglyness...
> > >
> > >   <shrug> That doesn't change the fact that it's the behaviour of every
> > > init binary since 1970 and that you should come with a better reason if
> > > you want to change it, especially since it's so easy to accomplish what
> > > you want with a little workaround.
> >
> > not really.  his proposal makes busybox smaller.  the only reason given
> > for making busybox larger is "it makes `ps` 'nicer'".  if there's no real
> > technical reason for it and nothing is impacted, then shrinking busybox
> > is a no brainer.  at the very least, it makes sense to make it a config
> > option that defaults to off.
> >
> > this was first changed here, but not really documented:
> >
> https://git.busybox.net/busybox/commit/?id=e132f4b09e5c9aedaef97f65279e8702633fd425
>
> Looking near that commit, I see that it moved the code in question, but
> it seems the origin was instead this commit:
>
> commit 3163821967821518cfa4c4315f775ec5301bb023
> Author: Erik Andersen <ander...@codepoet.org>
> Date:   Sat Jan 15 22:28:50 2000 +0000
>
>     Sync up busybox with the latest and greatest.  This is not stuff for
>     the Embedix release.
>      -Erik
>
> Nothing indicates what the reason was. Looking at that commit, it seems
> that some of it was from Debian-related work, but debian.org has nada.
>
> HTH,
> Isaac Dunham
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to