diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-04-06 05:17:57 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-04-06 05:17:57 +0000 |
commit | fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1 (patch) | |
tree | b692176a654613bb68ca37c42f88201aeb48d8ba /applets | |
parent | 50e4d660ace54d8da2cb09d537138447a92c68bd (diff) | |
download | busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.tar.gz busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.tar.bz2 busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.zip |
Apply lash_patch35 from vodz, which brings several nice size_optimizations.
Diffstat (limited to 'applets')
-rw-r--r-- | applets/busybox.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/applets/busybox.c b/applets/busybox.c index 858358175..4f1ef2661 100644 --- a/applets/busybox.c +++ b/applets/busybox.c | |||
@@ -18,12 +18,15 @@ const char *applet_name; | |||
18 | * this should be consistent w/ the enum, busybox.h::Location, | 18 | * this should be consistent w/ the enum, busybox.h::Location, |
19 | * or else... | 19 | * or else... |
20 | */ | 20 | */ |
21 | static char* install_dir[] = { | 21 | static const char usr_bin [] ="/usr/bin"; |
22 | "/", | 22 | static const char usr_sbin[] ="/usr/sbin"; |
23 | "/bin", | 23 | |
24 | "/sbin", | 24 | static const char* const install_dir[] = { |
25 | "/usr/bin", | 25 | &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */ |
26 | "/usr/sbin", | 26 | &usr_bin [4], /* "/bin" */ |
27 | &usr_sbin[4], /* "/sbin" */ | ||
28 | usr_bin, | ||
29 | usr_sbin | ||
27 | }; | 30 | }; |
28 | 31 | ||
29 | /* abstract link() */ | 32 | /* abstract link() */ |
@@ -35,7 +38,7 @@ typedef int (*__link_f)(const char *, const char *); | |||
35 | * malloc'd string w/ full pathname of busybox's location | 38 | * malloc'd string w/ full pathname of busybox's location |
36 | * NULL on failure | 39 | * NULL on failure |
37 | */ | 40 | */ |
38 | static char *busybox_fullpath(void) | 41 | static inline char *busybox_fullpath(void) |
39 | { | 42 | { |
40 | return xreadlink("/proc/self/exe"); | 43 | return xreadlink("/proc/self/exe"); |
41 | } | 44 | } |