diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-07-22 18:48:38 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-07-22 18:48:38 +0200 |
| commit | 0fb0045aa9261be1dda49dfdfb95cbc585402a8b (patch) | |
| tree | 951e3f34078b2a2e5702672472dc7ba3b1e51926 | |
| parent | 49117b48008e0fe36d6680c787045cb44a300f93 (diff) | |
| download | busybox-w32-0fb0045aa9261be1dda49dfdfb95cbc585402a8b.tar.gz busybox-w32-0fb0045aa9261be1dda49dfdfb95cbc585402a8b.tar.bz2 busybox-w32-0fb0045aa9261be1dda49dfdfb95cbc585402a8b.zip | |
config: disentangle PREFER_APPLETS from SH_STANDALONE and SH_NOFORK
On user request.
I thought enabling/disabling them all together is more consistent.
Evidently, some people do want them to be separately selectable.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | applets/applet_tables.c | 4 | ||||
| -rw-r--r-- | include/busybox.h | 4 | ||||
| -rw-r--r-- | libbb/vfork_daemon_rexec.c | 5 | ||||
| -rw-r--r-- | shell/Config.src | 4 |
4 files changed, 11 insertions, 6 deletions
diff --git a/applets/applet_tables.c b/applets/applet_tables.c index 843f2ec08..8401a1549 100644 --- a/applets/applet_tables.c +++ b/applets/applet_tables.c | |||
| @@ -143,7 +143,9 @@ int main(int argc, char **argv) | |||
| 143 | printf("};\n"); | 143 | printf("};\n"); |
| 144 | printf("#endif\n\n"); | 144 | printf("#endif\n\n"); |
| 145 | 145 | ||
| 146 | #if ENABLE_FEATURE_PREFER_APPLETS | 146 | #if ENABLE_FEATURE_PREFER_APPLETS \ |
| 147 | || ENABLE_FEATURE_SH_STANDALONE \ | ||
| 148 | || ENABLE_FEATURE_SH_NOFORK | ||
| 147 | printf("const uint8_t applet_flags[] ALIGN1 = {\n"); | 149 | printf("const uint8_t applet_flags[] ALIGN1 = {\n"); |
| 148 | i = 0; | 150 | i = 0; |
| 149 | while (i < NUM_APPLETS) { | 151 | while (i < NUM_APPLETS) { |
diff --git a/include/busybox.h b/include/busybox.h index 737627bd0..6a003d544 100644 --- a/include/busybox.h +++ b/include/busybox.h | |||
| @@ -19,7 +19,9 @@ extern const uint8_t applet_flags[] ALIGN1; | |||
| 19 | extern const uint8_t applet_suid[] ALIGN1; | 19 | extern const uint8_t applet_suid[] ALIGN1; |
| 20 | extern const uint8_t applet_install_loc[] ALIGN1; | 20 | extern const uint8_t applet_install_loc[] ALIGN1; |
| 21 | 21 | ||
| 22 | #if ENABLE_FEATURE_PREFER_APPLETS | 22 | #if ENABLE_FEATURE_PREFER_APPLETS \ |
| 23 | || ENABLE_FEATURE_SH_STANDALONE \ | ||
| 24 | || ENABLE_FEATURE_SH_NOFORK | ||
| 23 | # define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4)))) | 25 | # define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4)))) |
| 24 | # define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1))) | 26 | # define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1))) |
| 25 | #else | 27 | #else |
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index 1adb5b3c4..c192829b5 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c | |||
| @@ -68,7 +68,8 @@ pid_t FAST_FUNC xspawn(char **argv) | |||
| 68 | return pid; | 68 | return pid; |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | #if ENABLE_FEATURE_PREFER_APPLETS | 71 | #if ENABLE_FEATURE_PREFER_APPLETS \ |
| 72 | || ENABLE_FEATURE_SH_NOFORK | ||
| 72 | static jmp_buf die_jmp; | 73 | static jmp_buf die_jmp; |
| 73 | static void jump(void) | 74 | static void jump(void) |
| 74 | { | 75 | { |
| @@ -174,7 +175,7 @@ int FAST_FUNC run_nofork_applet(int applet_no, char **argv) | |||
| 174 | 175 | ||
| 175 | return rc & 0xff; /* don't confuse people with "exitcodes" >255 */ | 176 | return rc & 0xff; /* don't confuse people with "exitcodes" >255 */ |
| 176 | } | 177 | } |
| 177 | #endif /* FEATURE_PREFER_APPLETS */ | 178 | #endif /* FEATURE_PREFER_APPLETS || FEATURE_SH_NOFORK */ |
| 178 | 179 | ||
| 179 | int FAST_FUNC spawn_and_wait(char **argv) | 180 | int FAST_FUNC spawn_and_wait(char **argv) |
| 180 | { | 181 | { |
diff --git a/shell/Config.src b/shell/Config.src index b31e62dda..e4df35973 100644 --- a/shell/Config.src +++ b/shell/Config.src | |||
| @@ -88,7 +88,7 @@ config FEATURE_SH_EXTRA_QUIET | |||
| 88 | config FEATURE_SH_STANDALONE | 88 | config FEATURE_SH_STANDALONE |
| 89 | bool "Standalone shell" | 89 | bool "Standalone shell" |
| 90 | default n | 90 | default n |
| 91 | depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS | 91 | depends on (HUSH || ASH) |
| 92 | help | 92 | help |
| 93 | This option causes busybox shells to use busybox applets | 93 | This option causes busybox shells to use busybox applets |
| 94 | in preference to executables in the PATH whenever possible. For | 94 | in preference to executables in the PATH whenever possible. For |
| @@ -121,7 +121,7 @@ config FEATURE_SH_STANDALONE | |||
| 121 | config FEATURE_SH_NOFORK | 121 | config FEATURE_SH_NOFORK |
| 122 | bool "Run 'nofork' applets directly" | 122 | bool "Run 'nofork' applets directly" |
| 123 | default n | 123 | default n |
| 124 | depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS | 124 | depends on (HUSH || ASH) |
| 125 | help | 125 | help |
| 126 | This option causes busybox shells to not execute typical | 126 | This option causes busybox shells to not execute typical |
| 127 | fork/exec/wait sequence, but call <applet>_main directly, | 127 | fork/exec/wait sequence, but call <applet>_main directly, |
