Mercurial > hg > nginx
diff src/core/nginx.c @ 2073:01b71aa095cc
-g switch
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 30 Jun 2008 12:35:16 +0000 |
parents | 2a92804f4109 |
children | f62751dab60d |
line wrap: on
line diff
--- a/src/core/nginx.c Mon Jun 30 12:27:24 2008 +0000 +++ b/src/core/nginx.c Mon Jun 30 12:35:16 2008 +0000 @@ -637,8 +637,7 @@ case 'c': if (argv[i + 1] == NULL) { ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, - "the option: \"%s\" requires file name", - argv[i]); + "the option \"-c\" requires file name"); return NGX_ERROR; } @@ -646,6 +645,17 @@ cycle->conf_file.len = ngx_strlen(cycle->conf_file.data); break; + case 'g': + if (argv[i + 1] == NULL) { + ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, + "the option \"-g\" requires parameter"); + return NGX_ERROR; + } + + cycle->conf_param.data = (u_char *) argv[++i]; + cycle->conf_param.len = ngx_strlen(cycle->conf_param.data); + break; + default: ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, "invalid option: \"%s\"", argv[i]);