aboutsummaryrefslogtreecommitdiffstats
path: root/src/ck.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ck.c')
-rw-r--r--src/ck.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/ck.c b/src/ck.c
index 4a0a626..f9a2ad1 100644
--- a/src/ck.c
+++ b/src/ck.c
@@ -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*/