Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
2072:ee2fecdfdef7 | 2073:01b71aa095cc |
---|---|
635 break; | 635 break; |
636 | 636 |
637 case 'c': | 637 case 'c': |
638 if (argv[i + 1] == NULL) { | 638 if (argv[i + 1] == NULL) { |
639 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, | 639 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, |
640 "the option: \"%s\" requires file name", | 640 "the option \"-c\" requires file name"); |
641 argv[i]); | |
642 return NGX_ERROR; | 641 return NGX_ERROR; |
643 } | 642 } |
644 | 643 |
645 cycle->conf_file.data = (u_char *) argv[++i]; | 644 cycle->conf_file.data = (u_char *) argv[++i]; |
646 cycle->conf_file.len = ngx_strlen(cycle->conf_file.data); | 645 cycle->conf_file.len = ngx_strlen(cycle->conf_file.data); |
646 break; | |
647 | |
648 case 'g': | |
649 if (argv[i + 1] == NULL) { | |
650 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, | |
651 "the option \"-g\" requires parameter"); | |
652 return NGX_ERROR; | |
653 } | |
654 | |
655 cycle->conf_param.data = (u_char *) argv[++i]; | |
656 cycle->conf_param.len = ngx_strlen(cycle->conf_param.data); | |
647 break; | 657 break; |
648 | 658 |
649 default: | 659 default: |
650 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, | 660 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, |
651 "invalid option: \"%s\"", argv[i]); | 661 "invalid option: \"%s\"", argv[i]); |