-static struct writer_node_group *check_args(void)
-{
- int i, ret = -E_WRITE_SYNTAX;
- struct writer_node_group *g = NULL;
- struct initial_delay_task *idt = &the_initial_delay_task;
-
- loglevel = get_loglevel_by_name(conf.loglevel_arg);
- if (conf.start_time_given) {
- long unsigned sec, usec;
- if (sscanf(conf.start_time_arg, "%lu:%lu",
- &sec, &usec) != 2)
- goto out;
- idt->start_time.tv_sec = sec;
- idt->start_time.tv_usec = usec;
- }
- if (!conf.writer_given) {
- g = setup_default_wng();
- ret = 1;
- goto out;
- }
- g = wng_new(conf.writer_given);
- ret = -E_WRITE_SYNTAX;
- for (i = 0; i < conf.writer_given; i++) {
- int writer_num;
- g->writer_nodes[i].conf = check_writer_arg(
- conf.writer_arg[i], &writer_num);
- if (!g->writer_nodes[i].conf)
- goto out;
- g->writer_nodes[i].writer_num = writer_num;
- }
- ret = 1;
-out:
- if (ret > 0)
- return g;
- free(g);
- return NULL;
-}
-