diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
commit | defc1ea34074e7882724c460260d307cdf981a70 (patch) | |
tree | fca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/execable.c | |
parent | 26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff) | |
download | busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.gz busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.bz2 busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.zip |
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
Diffstat (limited to 'libbb/execable.c')
-rw-r--r-- | libbb/execable.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/execable.c b/libbb/execable.c index 5c2b4505c..5c7ac16a2 100644 --- a/libbb/execable.c +++ b/libbb/execable.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * return 1 if found; | 13 | * return 1 if found; |
14 | * return 0 otherwise; | 14 | * return 0 otherwise; |
15 | */ | 15 | */ |
16 | int execable_file(const char *name) | 16 | int FAST_FUNC execable_file(const char *name) |
17 | { | 17 | { |
18 | struct stat s; | 18 | struct stat s; |
19 | return (!access(name, X_OK) && !stat(name, &s) && S_ISREG(s.st_mode)); | 19 | return (!access(name, X_OK) && !stat(name, &s) && S_ISREG(s.st_mode)); |
@@ -28,7 +28,7 @@ int execable_file(const char *name) | |||
28 | * return NULL otherwise; (PATHp is undefined) | 28 | * return NULL otherwise; (PATHp is undefined) |
29 | * in all cases (*PATHp) contents will be trashed (s/:/NUL/). | 29 | * in all cases (*PATHp) contents will be trashed (s/:/NUL/). |
30 | */ | 30 | */ |
31 | char *find_execable(const char *filename, char **PATHp) | 31 | char* FAST_FUNC find_execable(const char *filename, char **PATHp) |
32 | { | 32 | { |
33 | char *p, *n; | 33 | char *p, *n; |
34 | 34 | ||
@@ -54,7 +54,7 @@ char *find_execable(const char *filename, char **PATHp) | |||
54 | * return 1 if found; | 54 | * return 1 if found; |
55 | * return 0 otherwise; | 55 | * return 0 otherwise; |
56 | */ | 56 | */ |
57 | int exists_execable(const char *filename) | 57 | int FAST_FUNC exists_execable(const char *filename) |
58 | { | 58 | { |
59 | char *path = xstrdup(getenv("PATH")); | 59 | char *path = xstrdup(getenv("PATH")); |
60 | char *tmp = path; | 60 | char *tmp = path; |
@@ -70,7 +70,7 @@ int exists_execable(const char *filename) | |||
70 | #if ENABLE_FEATURE_PREFER_APPLETS | 70 | #if ENABLE_FEATURE_PREFER_APPLETS |
71 | /* just like the real execvp, but try to launch an applet named 'file' first | 71 | /* just like the real execvp, but try to launch an applet named 'file' first |
72 | */ | 72 | */ |
73 | int bb_execvp(const char *file, char *const argv[]) | 73 | int FAST_FUNC bb_execvp(const char *file, char *const argv[]) |
74 | { | 74 | { |
75 | return execvp(find_applet_by_name(file) >= 0 ? bb_busybox_exec_path : file, | 75 | return execvp(find_applet_by_name(file) >= 0 ? bb_busybox_exec_path : file, |
76 | argv); | 76 | argv); |