diff options
author | midipix <writeonce@midipix.org> | 2018-08-04 06:04:41 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-08-04 06:04:41 -0400 |
commit | f3339c87545a02d231d5229d9ccca6e81ed0ef79 (patch) | |
tree | 7647da6188e8166a7591e477f9bb44c400cbf3be | |
parent | 4999503f7e76a4f49c287f62293321f265eb71fa (diff) | |
download | apimagic-f3339c87545a02d231d5229d9ccca6e81ed0ef79.tar.bz2 apimagic-f3339c87545a02d231d5229d9ccca6e81ed0ef79.tar.xz |
library: removed amgc_create_driver_ctx() [too much of a good thing].
-rw-r--r-- | include/apimagic/apimagic.h | 1 | ||||
-rw-r--r-- | src/driver/amgc_driver_ctx.c | 23 |
2 files changed, 0 insertions, 24 deletions
diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h index 299dfeb..45403bc 100644 --- a/include/apimagic/apimagic.h +++ b/include/apimagic/apimagic.h @@ -191,7 +191,6 @@ amgc_api const struct amgc_source_version * amgc_source_version(void); /* driver api */ amgc_api int amgc_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, struct amgc_driver_ctx **); -amgc_api int amgc_create_driver_ctx (const struct amgc_common_ctx *, struct amgc_driver_ctx **); amgc_api void amgc_free_driver_ctx (struct amgc_driver_ctx *); amgc_api int amgc_get_unit_ctx (const struct amgc_driver_ctx *, const char * path, struct amgc_unit_ctx **); diff --git a/src/driver/amgc_driver_ctx.c b/src/driver/amgc_driver_ctx.c index 620162d..e22d566 100644 --- a/src/driver/amgc_driver_ctx.c +++ b/src/driver/amgc_driver_ctx.c @@ -252,29 +252,6 @@ int amgc_get_driver_ctx( return AMGC_OK; } -int amgc_create_driver_ctx( - const struct amgc_common_ctx * cctx, - struct amgc_driver_ctx ** pctx) -{ - const struct argv_option * optv[AMGC_OPTV_ELEMENTS]; - struct argv_meta * meta; - struct amgc_driver_ctx_impl * ctx; - char * argv[] = {"apimagic_driver",0}; - - argv_optv_init(amgc_default_options,optv); - - if (!(meta = argv_get(argv,optv,0,STDERR_FILENO))) - return -1; - - if (!(ctx = amgc_driver_ctx_alloc(meta,cctx,0,0))) - return amgc_get_driver_ctx_fail(0); - - ctx->ctx.cctx = &ctx->cctx; - memcpy(&ctx->cctx,cctx,sizeof(*cctx)); - *pctx = &ctx->ctx; - return AMGC_OK; -} - static void amgc_exit_cparser(void) { exit_firm_opt(); |