From 354314deecd4e4b4bb857bb85f1ece8cd921de97 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 4 Aug 2018 06:03:09 -0400 Subject: library: removed slbt_create_driver_ctx() [too much of a good thing]. --- src/driver/slbt_driver_ctx.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'src/driver/slbt_driver_ctx.c') diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index 120f014..eac59c5 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -1333,41 +1333,6 @@ int slbt_get_driver_ctx( return SLBT_OK; } -int slbt_create_driver_ctx( - const struct slbt_common_ctx * cctx, - const struct slbt_fd_ctx * fdctx, - struct slbt_driver_ctx ** pctx) -{ - const struct argv_option * optv[SLBT_OPTV_ELEMENTS]; - struct argv_meta * meta; - struct slbt_driver_ctx_impl * ctx; - char * argv[] = {"slibtool_driver",0}; - - argv_optv_init(slbt_default_options,optv); - - if (!fdctx) { - fdctx = &(const struct slbt_fd_ctx) { - .fdin = STDIN_FILENO, - .fdout = STDOUT_FILENO, - .fderr = STDERR_FILENO, - .fdlog = (-1), - .fdcwd = AT_FDCWD, - .fddst = AT_FDCWD, - }; - } - - if (!(meta = argv_get(argv,optv,0,fdctx->fderr))) - return -1; - - if (!(ctx = slbt_driver_ctx_alloc(meta,fdctx,cctx))) - return slbt_get_driver_ctx_fail(0); - - ctx->ctx.cctx = &ctx->cctx; - memcpy(&ctx->cctx,cctx,sizeof(*cctx)); - *pctx = &ctx->ctx; - return SLBT_OK; -} - static void slbt_free_driver_ctx_impl(struct slbt_driver_ctx_alloc * ictx) { if (ictx->ctx.targv) -- cgit v1.2.3