diff options
Diffstat (limited to 'src/ck.c')
-rw-r--r-- | src/ck.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -35,21 +35,16 @@ #include "ckerrlog.h" int main(int argc, char *argv[]) { - initialize_errlog(); + initialize_errlog(argc, argv); UserOpt opt; Conf conf = {.vc_dir = NULL, .scrt_dir = NULL}; /* get user opt */ - switch(parse_action(argc, argv, &opt)) { - case APR_HELP: - print_parser_help(); + int rc = parse_action(argc, argv, &opt); + if (rc < 0) { goto error; - case APR_ERR: - print_parser_error(&opt); - goto error; - case APR_VERSION: + } + else if (rc == 1) { goto close; - case APR_OK: - break; } /* If the action is init don't load the config, skip to running init*/ |