diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index fe185f5d9..e21c4433d 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -161,6 +161,18 @@ | |||
161 | //config: help | 161 | //config: help |
162 | //config: Enable "check for new mail" function in the ash shell. | 162 | //config: Enable "check for new mail" function in the ash shell. |
163 | //config: | 163 | //config: |
164 | //config: | ||
165 | //config:config ASH_NOCONSOLE | ||
166 | //config: bool "'noconsole' option" | ||
167 | //config: default y | ||
168 | //config: depends on (ASH || SH_IS_ASH || BASH_IS_ASH) && PLATFORM_MINGW32 | ||
169 | //config: help | ||
170 | //config: Enable support for the 'noconsole' option, which attempts to | ||
171 | //config: hide the console normally associated with a command line | ||
172 | //config: application. This may be useful when running a shell script | ||
173 | //config: from a GUI application. Disable this if your platform doesn't | ||
174 | //config: support the required APIs. | ||
175 | //config: | ||
164 | //config:endif # ash options | 176 | //config:endif # ash options |
165 | 177 | ||
166 | //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP)) | 178 | //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP)) |
@@ -334,9 +346,11 @@ static const char *const optletters_optnames[] = { | |||
334 | ,"\0" "debug" | 346 | ,"\0" "debug" |
335 | #endif | 347 | #endif |
336 | #if ENABLE_PLATFORM_MINGW32 | 348 | #if ENABLE_PLATFORM_MINGW32 |
337 | ,"\0" "noconsole" | ||
338 | ,"X" "winxp" | 349 | ,"X" "winxp" |
339 | #endif | 350 | #endif |
351 | #if ENABLE_ASH_NOCONSOLE | ||
352 | ,"\0" "noconsole" | ||
353 | #endif | ||
340 | }; | 354 | }; |
341 | 355 | ||
342 | #define optletters(n) optletters_optnames[n][0] | 356 | #define optletters(n) optletters_optnames[n][0] |
@@ -417,8 +431,10 @@ struct globals_misc { | |||
417 | # define debug optlist[15 + ENABLE_ASH_BASH_COMPAT] | 431 | # define debug optlist[15 + ENABLE_ASH_BASH_COMPAT] |
418 | #endif | 432 | #endif |
419 | #if ENABLE_PLATFORM_MINGW32 | 433 | #if ENABLE_PLATFORM_MINGW32 |
420 | # define noconsole optlist[14 + ENABLE_ASH_BASH_COMPAT + 2*DEBUG] | 434 | # define winxp optlist[14 + ENABLE_ASH_BASH_COMPAT + 2*DEBUG] |
421 | # define winxp optlist[15 + ENABLE_ASH_BASH_COMPAT + 2*DEBUG] | 435 | #endif |
436 | #if ENABLE_ASH_NOCONSOLE | ||
437 | # define noconsole optlist[15 + ENABLE_ASH_BASH_COMPAT + 2*DEBUG] | ||
422 | #endif | 438 | #endif |
423 | 439 | ||
424 | /* trap handler commands */ | 440 | /* trap handler commands */ |
@@ -14097,7 +14113,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv) | |||
14097 | trace_puts_args(argv); | 14113 | trace_puts_args(argv); |
14098 | #endif | 14114 | #endif |
14099 | 14115 | ||
14100 | #if ENABLE_PLATFORM_MINGW32 | 14116 | #if ENABLE_ASH_NOCONSOLE |
14101 | if ( noconsole ) { | 14117 | if ( noconsole ) { |
14102 | DWORD dummy; | 14118 | DWORD dummy; |
14103 | 14119 | ||