From b4ed16eddb2433f002139ad1e133427b77814d43 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 6 Aug 2011 22:01:48 +0200 Subject: [PATCH 1/1] write: Rename main_btr() to setup_and_schedule(). The old name was a leftover from the long ago when para_write started to use the buffer tree API. --- write.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/write.c b/write.c index 9762c40c..3d1b0932 100644 --- a/write.c +++ b/write.c @@ -200,11 +200,12 @@ static int setup_writer_node(const char *arg, struct btr_node *parent, return 1; } -static int main_btr(struct sched *s) +static int setup_and_schedule(void) { int i, ret; struct check_wav_task _cwt, *cwt = &_cwt; struct writer_node *wns; + static struct sched s; loglevel = get_loglevel_by_name(conf.loglevel_arg); sit.btrn = btr_new_node(&(struct btr_node_description) @@ -241,9 +242,9 @@ static int main_btr(struct sched *s) } } - s->default_timeout.tv_sec = 10; - s->default_timeout.tv_usec = 50000; - ret = schedule(s); + s.default_timeout.tv_sec = 10; + s.default_timeout.tv_usec = 50000; + ret = schedule(&s); if (ret >= 0) { int j; for (j = 0; j < i; j++) { @@ -287,7 +288,6 @@ out: int main(int argc, char *argv[]) { int ret = -E_WRITE_SYNTAX; - static struct sched s; writer_init(); write_cmdline_parser(argc, argv, &conf); @@ -295,7 +295,7 @@ int main(int argc, char *argv[]) if (conf.help_given || conf.detailed_help_given) print_help_and_die(); - ret = main_btr(&s); + ret = setup_and_schedule(); if (ret < 0) { PARA_ERROR_LOG("%s\n", para_strerror(-ret)); exit(EXIT_FAILURE); -- 2.39.2