diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-01 12:50:33 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-01 12:50:33 +0100 |
| commit | b0df5af0fad7969a10d3910465bfd0ff518b1358 (patch) | |
| tree | de5d30f78a4a1f32b9d64597707aa4378b0621bf /shell | |
| parent | ca82b5354feca83374c78a7bdd43ef3aab9204e9 (diff) | |
| download | busybox-w32-b0df5af0fad7969a10d3910465bfd0ff518b1358.tar.gz busybox-w32-b0df5af0fad7969a10d3910465bfd0ff518b1358.tar.bz2 busybox-w32-b0df5af0fad7969a10d3910465bfd0ff518b1358.zip | |
ash: fix thinko in last commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c index 19004aad8..88f2b5bd6 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -8018,8 +8018,7 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c | |||
| 8018 | #if ENABLE_FEATURE_SH_STANDALONE | 8018 | #if ENABLE_FEATURE_SH_STANDALONE |
| 8019 | if (applet_no >= 0) { | 8019 | if (applet_no >= 0) { |
| 8020 | # if NUM_SCRIPTS > 0 | 8020 | # if NUM_SCRIPTS > 0 |
| 8021 | if (applet_no >= NUM_APPLETS) | 8021 | if (applet_no < NUM_APPLETS) |
| 8022 | goto run_script; | ||
| 8023 | # endif | 8022 | # endif |
| 8024 | if (APPLET_IS_NOEXEC(applet_no)) { | 8023 | if (APPLET_IS_NOEXEC(applet_no)) { |
| 8025 | clearenv(); | 8024 | clearenv(); |
| @@ -8045,9 +8044,6 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c | |||
| 8045 | #endif | 8044 | #endif |
| 8046 | 8045 | ||
| 8047 | if (cmd != bb_busybox_exec_path && errno == ENOEXEC) { | 8046 | if (cmd != bb_busybox_exec_path && errno == ENOEXEC) { |
| 8048 | #if ENABLE_FEATURE_SH_STANDALONE && NUM_SCRIPTS > 0 | ||
| 8049 | run_script: | ||
| 8050 | #endif | ||
| 8051 | /* Run "cmd" as a shell script: | 8047 | /* Run "cmd" as a shell script: |
| 8052 | * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html | 8048 | * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html |
| 8053 | * "If the execve() function fails with ENOEXEC, the shell | 8049 | * "If the execve() function fails with ENOEXEC, the shell |
