summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-08-04 06:57:53 -0400
committermidipix <writeonce@midipix.org>2018-08-04 06:57:53 -0400
commit787b40192a1415d973c04c3a02826db3fa51394f (patch)
treee7725985782bfb5cbdbef097403a62f4bb589db9
parent71f809d21ce73dffecf370a761a83d892504465b (diff)
downloadntux-787b40192a1415d973c04c3a02826db3fa51394f.tar.bz2
ntux-787b40192a1415d973c04c3a02826db3fa51394f.tar.xz
library: removed ntux_create_driver_ctx() [too much of a good thing].
-rw-r--r--include/ntux/ntux.h1
-rw-r--r--src/driver/ntux_driver_ctx.c26
2 files changed, 0 insertions, 27 deletions
diff --git a/include/ntux/ntux.h b/include/ntux/ntux.h
index 6063304..29a6f55 100644
--- a/include/ntux/ntux.h
+++ b/include/ntux/ntux.h
@@ -110,7 +110,6 @@ ntux_api const struct ntux_source_version * ntux_source_version(void);
/* driver api */
ntux_api int ntux_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, struct ntux_driver_ctx **);
-ntux_api int ntux_create_driver_ctx (const struct ntux_common_ctx *, struct ntux_driver_ctx **);
ntux_api void ntux_free_driver_ctx (struct ntux_driver_ctx *);
/* cmd api */
diff --git a/src/driver/ntux_driver_ctx.c b/src/driver/ntux_driver_ctx.c
index ef3d987..954b2db 100644
--- a/src/driver/ntux_driver_ctx.c
+++ b/src/driver/ntux_driver_ctx.c
@@ -374,32 +374,6 @@ int ntux_get_driver_ctx(
return 0;
}
-int ntux_create_driver_ctx(
- const struct ntux_common_ctx * cctx,
- struct ntux_driver_ctx ** pctx)
-{
- const struct argv_option * optv[NTUX_OPTV_ELEMENTS];
- struct argv_meta * meta;
- struct ntux_driver_ctx_impl * ctx;
- char * argv[] = {"ntux_driver",0};
-
- if (ntux_init())
- return -1;
-
- argv_optv_init(ntux_default_options,optv);
-
- if (!(meta = argv_get(argv,optv,0,STDERR_FILENO)))
- return -1;
-
- if (!(ctx = ntux_driver_ctx_alloc(meta,cctx,0)))
- return ntux_get_driver_ctx_fail(0);
-
- ctx->ctx.cctx = &ctx->cctx;
- memcpy(&ctx->cctx,cctx,sizeof(*cctx));
- *pctx = &ctx->ctx;
- return NTUX_OK;
-}
-
static void ntux_free_driver_ctx_impl(struct ntux_driver_ctx_alloc * ictx)
{
argv_free(ictx->meta);