X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write.c;h=f4f757fff2957f75876df33a83b41fd91aad3571;hp=3deef1474c840a48e88d4db6717b0d446a1e994b;hb=b01605d7062e4d1f005d5aaaaed158d8efe06d79;hpb=3879481ddabc38236b9eee979a090c2a9bfa74d3 diff --git a/write.c b/write.c index 3deef147..f4f757ff 100644 --- a/write.c +++ b/write.c @@ -86,10 +86,10 @@ static void write_pre_select(struct sched *s, struct task *t) check_wav_pre_select(s, wt->cwc); } -static void write_post_select(__a_unused struct sched *s, struct task *t) +static int write_post_select(__a_unused struct sched *s, struct task *t) { struct write_task *wt = container_of(t, struct write_task, task); - t->error = check_wav_post_select(wt->cwc); + return check_wav_post_select(wt->cwc); } static int setup_and_schedule(void) @@ -107,7 +107,6 @@ static int setup_and_schedule(void) }, }; - loglevel = get_loglevel_by_name(conf.loglevel_arg); sit.btrn = btr_new_node(&(struct btr_node_description) EMBRACE(.name = "stdin")); stdin_set_defaults(&sit); @@ -173,8 +172,9 @@ int main(int argc, char *argv[]) { int ret; - writer_init(); write_cmdline_parser(argc, argv, &conf); + loglevel = get_loglevel_by_name(conf.loglevel_arg); + writer_init(); HANDLE_VERSION_FLAG("write", conf); if (conf.help_given || conf.detailed_help_given) print_help_and_die();