diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/httpd.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 7e1c187a5..9cf85dc21 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -220,7 +220,12 @@ | |||
220 | //kbuild:lib-$(CONFIG_HTTPD) += httpd.o | 220 | //kbuild:lib-$(CONFIG_HTTPD) += httpd.o |
221 | 221 | ||
222 | //usage:#define httpd_trivial_usage | 222 | //usage:#define httpd_trivial_usage |
223 | //usage: IF_NOT_PLATFORM_MINGW32( | ||
223 | //usage: "[-ifv[v]]" | 224 | //usage: "[-ifv[v]]" |
225 | //usage: ) | ||
226 | //usage: IF_PLATFORM_MINGW32( | ||
227 | //usage: "[-fv[v]]" | ||
228 | //usage: ) | ||
224 | //usage: " [-c CONFFILE]" | 229 | //usage: " [-c CONFFILE]" |
225 | //usage: " [-p [IP:]PORT]" | 230 | //usage: " [-p [IP:]PORT]" |
226 | //usage: IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") | 231 | //usage: IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") |
@@ -232,9 +237,6 @@ | |||
232 | //usage: IF_NOT_PLATFORM_MINGW32( | 237 | //usage: IF_NOT_PLATFORM_MINGW32( |
233 | //usage: "\n -i Inetd mode" | 238 | //usage: "\n -i Inetd mode" |
234 | //usage: ) | 239 | //usage: ) |
235 | //usage: IF_PLATFORM_MINGW32( | ||
236 | //usage: "\n -i fd Inetd mode file descriptor" | ||
237 | //usage: ) | ||
238 | //usage: "\n -f Don't daemonize" | 240 | //usage: "\n -f Don't daemonize" |
239 | //usage: "\n -v[v] Verbose" | 241 | //usage: "\n -v[v] Verbose" |
240 | //usage: "\n -p [IP:]PORT Bind to IP:PORT (default *:80)" | 242 | //usage: "\n -p [IP:]PORT Bind to IP:PORT (default *:80)" |
@@ -2670,7 +2672,7 @@ static void mini_httpd_win32(int fg, int sock, int argc, char **argv) | |||
2670 | argv_copy[0] = (char *)bb_busybox_exec_path; | 2672 | argv_copy[0] = (char *)bb_busybox_exec_path; |
2671 | argv_copy[1] = (char *)"--busybox"; | 2673 | argv_copy[1] = (char *)"--busybox"; |
2672 | argv_copy[2] = (char *)"httpd"; | 2674 | argv_copy[2] = (char *)"httpd"; |
2673 | argv_copy[3] = (char *)"-i"; | 2675 | argv_copy[3] = (char *)"-I"; |
2674 | memcpy(&argv_copy[5], &argv[1], argc * sizeof(argv[0])); | 2676 | memcpy(&argv_copy[5], &argv[1], argc * sizeof(argv[0])); |
2675 | 2677 | ||
2676 | while (1) { | 2678 | while (1) { |
@@ -2801,10 +2803,11 @@ int httpd_main(int argc UNUSED_PARAM, char **argv) | |||
2801 | IF_FEATURE_HTTPD_AUTH_MD5("m:") | 2803 | IF_FEATURE_HTTPD_AUTH_MD5("m:") |
2802 | IF_FEATURE_HTTPD_SETUID("u:") | 2804 | IF_FEATURE_HTTPD_SETUID("u:") |
2803 | IF_NOT_PLATFORM_MINGW32("p:ifv") | 2805 | IF_NOT_PLATFORM_MINGW32("p:ifv") |
2804 | IF_PLATFORM_MINGW32("p:i:+fv") | 2806 | IF_PLATFORM_MINGW32("p:I:+fv") |
2805 | "\0" | 2807 | "\0" |
2806 | /* -v counts, -i implies -f */ | 2808 | /* -v counts, -i implies -f */ |
2807 | "vv:if", | 2809 | IF_NOT_PLATFORM_MINGW32("vv:if",) |
2810 | IF_PLATFORM_MINGW32("vv:If",) | ||
2808 | &opt_c_configFile, &url_for_decode, &home_httpd | 2811 | &opt_c_configFile, &url_for_decode, &home_httpd |
2809 | IF_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) | 2812 | IF_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) |
2810 | IF_FEATURE_HTTPD_BASIC_AUTH(, &g_realm) | 2813 | IF_FEATURE_HTTPD_BASIC_AUTH(, &g_realm) |
@@ -2852,7 +2855,10 @@ int httpd_main(int argc UNUSED_PARAM, char **argv) | |||
2852 | mingw_daemonize(argv); | 2855 | mingw_daemonize(argv); |
2853 | #endif | 2856 | #endif |
2854 | 2857 | ||
2855 | xchdir(home_httpd); | 2858 | #if ENABLE_PLATFORM_MINGW32 |
2859 | if (!(opt & OPT_INETD)) | ||
2860 | #endif | ||
2861 | xchdir(home_httpd); | ||
2856 | if (!(opt & OPT_INETD)) { | 2862 | if (!(opt & OPT_INETD)) { |
2857 | #ifdef SIGCHLD | 2863 | #ifdef SIGCHLD |
2858 | signal(SIGCHLD, SIG_IGN); | 2864 | signal(SIGCHLD, SIG_IGN); |