[BusyBox] Last optimization patch

Erik Andersen andersen at codepoet.org
Fri Apr 5 22:18:26 UTC 2002


On Tue Mar 26, 2002 at 02:09:24PM +0300, Vladimir N. Oleynik wrote:
> Hi.
> 
> The kilobyte of free space on my rescue disk urgently was necessary for me 
> and I offer result of search: :)

Looks good.  I have applied this, and backported most of the
optimizations to busybox.stable as well (in preparation for
getting 0.60.3 released -- the end of the 0.60.x series).


--- busybox.orig/applets/busybox.c	Mon Mar 25 12:47:08 2002
+++ busybox/applets/busybox.c	Mon Mar 25 14:29:14 2002
+static const char usr_bin [] ="/usr/bin";
+static const char usr_sbin[] ="/usr/sbin";
+static const char* const install_dir[] = {
+	&usr_bin [8], /* "", equivalent to "/" for concat_path_file() */
+	&usr_bin [4], /* "/bin" */
+	&usr_sbin[4], /* "/sbin" */
+	usr_bin,
+	usr_sbin
 };
 


Very sneaky.  I like it.  :)



diff -rbu busybox.orig/fileutils/ln.c busybox/fileutils/ln.c
--- busybox.orig/fileutils/ln.c	Mon Mar 25 12:50:48 2002
+++ busybox/fileutils/ln.c	Sat Mar 23 17:59:08 2002
-	exit(status);
+	return status;
 

Why?  I do not see this one making any size difference...

 -Erik

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



More information about the busybox mailing list