diff options
Diffstat (limited to 'server/main.c')
-rw-r--r-- | server/main.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/server/main.c b/server/main.c index 24a54d3f..b893d281 100644 --- a/server/main.c +++ b/server/main.c @@ -321,14 +321,7 @@ static process_rec *init_process(int *argc, const char * const * *argv) static void usage(process_rec *process) { const char *bin = process->argv[0]; - char pad[MAX_STRING_LEN]; - unsigned i; - - for (i = 0; i < strlen(bin); i++) { - pad[i] = ' '; - } - - pad[i] = '\0'; + int pad_len = strlen(bin); #ifdef SHARED_CORE ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL , @@ -340,28 +333,28 @@ static void usage(process_rec *process) #endif ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " %s [-C \"directive\"] [-c \"directive\"]", pad); + " %*s [-C \"directive\"] [-c \"directive\"]", pad_len, " "); #ifdef WIN32 ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " %s [-w] [-k start|restart|stop|shutdown]", pad); + " %*s [-w] [-k start|restart|stop|shutdown]", pad_len, " "); ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " %s [-k install|config|uninstall] [-n service_name]", - pad); + " %*s [-k install|config|uninstall] [-n service_name]", + pad_len, " "); #endif #ifdef AP_MPM_WANT_SIGNAL_SERVER #ifdef AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " %s [-k start|restart|graceful|graceful-stop|stop]", - pad); + " %*s [-k start|restart|graceful|graceful-stop|stop]", + pad_len, " "); #else ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " %s [-k start|restart|graceful|stop]", - pad); + " %*s [-k start|restart|graceful|stop]", pad_len, " "); #endif /* AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN */ #endif ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " %s [-v] [-V] [-h] [-l] [-L] [-t] [-S]", pad); + " %*s [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]", + pad_len, " "); ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Options:"); @@ -440,6 +433,8 @@ static void usage(process_rec *process) " -M : a synonym for -t -D DUMP_MODULES"); ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -t : run syntax check for config files"); + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + " -T : start without DocumentRoot(s) check"); destroy_and_exit_process(process, 1); } @@ -592,6 +587,10 @@ int main(int argc, const char * const argv[]) configtestonly = 1; break; + case 'T': + ap_document_root_check = 0; + break; + case 'S': configtestonly = 1; new = (char **)apr_array_push(ap_server_config_defines); |