X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afh_recv.c;h=0c7b3946377b6d25be9549834920054e3034de0d;hp=d042398bef6f30d4a1a385f125d94efff0e172d1;hb=3889b355ca075111a717da36946c779b7474a63d;hpb=83ab4b5d38bb63cf4724022c3804d3eaa2ac51d3 diff --git a/afh_recv.c b/afh_recv.c index d042398b..0c7b3946 100644 --- a/afh_recv.c +++ b/afh_recv.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 Andre Noll + * Copyright (C) 2011-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -70,10 +70,8 @@ static void *afh_recv_parse_config(int argc, char **argv) { struct afh_recv_args_info *tmp = para_calloc(sizeof(*tmp)); - if (!afh_recv_cmdline_parser(argc, argv, tmp)) - return tmp; - free(tmp); - return NULL; + afh_recv_cmdline_parser(argc, argv, tmp); + return tmp; } static void afh_recv_free_config(void *conf) @@ -173,7 +171,7 @@ static void afh_recv_pre_select(struct sched *s, struct task *t) sched_request_barrier_or_min_delay(&chunk_time, s); } -static void afh_recv_post_select(__a_unused struct sched *s, struct task *t) +static int afh_recv_post_select(__a_unused struct sched *s, struct task *t) { struct receiver_node *rn = container_of(t, struct receiver_node, task); struct afh_recv_args_info *conf = rn->conf; @@ -233,7 +231,7 @@ out: btr_remove_node(&rn->btrn); pard->current_chunk = pard->first_chunk; } - t->error = ret; + return ret; } /** @@ -256,9 +254,6 @@ void afh_recv_init(struct receiver *r) r->parse_config = afh_recv_parse_config; r->free_config = afh_recv_free_config; r->execute = afh_execute; - r->help = (struct ggo_help) { - .short_help = afh_recv_args_info_help, - .detailed_help = afh_recv_args_info_detailed_help - }; + r->help = (struct ggo_help)DEFINE_GGO_HELP(afh_recv); afh_recv_cmdline_parser_free(&dummy); }