X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=oss_write.c;h=57e2387f74affad9a3608a30ff3501e8e520dfeb;hp=f075ce502900e03e3fb743229e9f6ca7c735725e;hb=8fa50e3e39b4f65dea2a694dc064038a41036642;hpb=f0e41e36c3f1a3a5bb6ff66d92d2814391d8f908 diff --git a/oss_write.c b/oss_write.c index f075ce50..57e2387f 100644 --- a/oss_write.c +++ b/oss_write.c @@ -152,6 +152,8 @@ err: close(powd->fd); err_free: free(powd); + PARA_ERROR_LOG("failed to init %s: %s\n", conf->device_arg, + para_strerror(-ret)); return ret; } @@ -197,15 +199,15 @@ static void oss_post_select(__a_unused struct sched *s, out: t->error = ret; if (ret < 0) - btr_remove_node(btrn); + btr_remove_node(&wn->btrn); } -__malloc static void *oss_parse_config_or_die(const char *options) +__malloc static void *oss_parse_config_or_die(int argc, char **argv) { struct oss_write_args_info *conf = para_calloc(sizeof(*conf)); /* exits on errors */ - oss_cmdline_parser_string(options, conf, "oss_write"); + oss_cmdline_parser(argc, argv, conf); return conf; } @@ -231,7 +233,6 @@ void oss_write_init(struct writer *w) w->post_select = oss_post_select; w->parse_config_or_die = oss_parse_config_or_die; w->free_config = oss_free_config; - w->shutdown = NULL; w->help = (struct ggo_help) { .short_help = oss_write_args_info_help, .detailed_help = oss_write_args_info_detailed_help