diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2024-10-08 04:03:17 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2024-10-08 04:03:17 +0200 |
commit | 49d9e06fbab0b02a71deed57610edb0c8f4fb20c (patch) | |
tree | 6b5263bcdb0972eaf17f35dbb8c2ce65d13a790e /include | |
parent | 8c4bccb83e5e2594f16310b7cbe07bf05fc9f13a (diff) | |
download | busybox-w32-49d9e06fbab0b02a71deed57610edb0c8f4fb20c.tar.gz busybox-w32-49d9e06fbab0b02a71deed57610edb0c8f4fb20c.tar.bz2 busybox-w32-49d9e06fbab0b02a71deed57610edb0c8f4fb20c.zip |
libbb: modify find_executable() to not temporarily write to PATH
This allows to simplify "which" applet code
function old new delta
find_executable 93 111 +18
which_main 191 177 -14
builtin_source 316 294 -22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 18/-36) Total: -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index f5f8e1635..4d6193795 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1227,7 +1227,7 @@ void FAST_FUNC update_utmp_DEAD_PROCESS(pid_t pid); | |||
1227 | 1227 | ||
1228 | 1228 | ||
1229 | int file_is_executable(const char *name) FAST_FUNC; | 1229 | int file_is_executable(const char *name) FAST_FUNC; |
1230 | char *find_executable(const char *filename, char **PATHp) FAST_FUNC; | 1230 | char *find_executable(const char *filename, const char **PATHp) FAST_FUNC; |
1231 | int executable_exists(const char *filename) FAST_FUNC; | 1231 | int executable_exists(const char *filename) FAST_FUNC; |
1232 | 1232 | ||
1233 | /* BB_EXECxx always execs (it's not doing NOFORK/NOEXEC stuff), | 1233 | /* BB_EXECxx always execs (it's not doing NOFORK/NOEXEC stuff), |