const char **p = d? write_args_info_detailed_help
: write_args_info_help;
- printf_or_die("%s\n\n", WRITE_CMDLINE_PARSER_PACKAGE "-"
- WRITE_CMDLINE_PARSER_VERSION);
+ printf_or_die("%s\n\n", version_single_line("write"));
printf_or_die("%s\n\n", write_args_info_usage);
for (; *p; p++)
printf_or_die("%s\n", *p);
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)
},
};
- loglevel = get_loglevel_by_name(conf.loglevel_arg);
sit.btrn = btr_new_node(&(struct btr_node_description)
EMBRACE(.name = "stdin"));
stdin_set_defaults(&sit);
{
int ret;
- writer_init();
write_cmdline_parser(argc, argv, &conf);
- HANDLE_VERSION_FLAG("write", conf);
+ loglevel = get_loglevel_by_name(conf.loglevel_arg);
+ writer_init();
+ version_handle_flag("write", conf.version_given);
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();