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);