[BusyBox] interesing my ideas?!
Vladimir N. Oleynik
dzo at simtreas.ru
Thu Jan 11 10:33:16 UTC 2001
Larry Doolittle wrote:
> I looked at Vladimir's patch. Most of it is clearly an improvement.
>
> 1. Pulling search_applet() out as a seperate routine is good,
> but I think it belongs in utility.c, and should use the bsearch()
Oh, yes. I can`t generate path to utilites.c without our reaction
on my previous path to utilites.c 07 Jan 2001 18 GMT.
> method that busybox.c and sh.c use now. If you measure that the
This metod is very strange.
1) Function bsearch() not used in other all aplications.
2) Bsearch not have significant fast with small array.
3) Metod: compare first char and is true, compare with full string -
also fast and is standart programmer`s metod.
Function bsearch arise a interest in only study :) (IHMO).
> 2. Encapsulating access to the name and directory of applets is good,
> but the modern way to do that is with inline functions instead of
> macros.
Ok. But this style i not found in our package :)
> 4. I don't think I understand the motivation, or consequences, of your
> change to error handling in busybox --install.
Busybox whith option --install not have visible effect stranger
returned function strdup NULL. (My path also not true, i hurry,
change to xstrdup()).
I rewrote function install_links() with IHMO good style and gain size,
full equalent is add path "return rc" to "return rc!=0". This only
example for comments.
My add idea for merge our packages tinylogin and netkit-tiny.
Exampe very small suid wrapper:
void exit(int code) { _exit(code); }
int main(int argc, char **argv) {
execv("/bin/busybox", argv);
write(2, "Can`t start busybox!\n", 21);
return 1;
}
If compile this together with our special libc, your having small
static suid wrapper.
If renamed this to /bin/passwd, ping, traceroute, su; your can
merge all packets in one busybox.
--w
vodz
More information about the busybox
mailing list