diff options
author | midipix <writeonce@midipix.org> | 2018-08-04 02:17:40 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-08-04 05:12:13 -0400 |
commit | e80af14208bc82433e377c4615d93e0041c03407 (patch) | |
tree | 955a8f6e7c634b3b5845bed68125f247e9320681 | |
parent | e9413de20a732201856e65954aaea3c5b2323be1 (diff) | |
download | sofort-e80af14208bc82433e377c4615d93e0041c03407.tar.bz2 sofort-e80af14208bc82433e377c4615d93e0041c03407.tar.xz |
library: removed sfrt_create_driver_ctx() [too much of a good thing].
-rw-r--r-- | include/sofort/sofort.h | 1 | ||||
-rw-r--r-- | src/driver/sfrt_driver_ctx.c | 23 |
2 files changed, 0 insertions, 24 deletions
diff --git a/include/sofort/sofort.h b/include/sofort/sofort.h index ff1fb60..61620bf 100644 --- a/include/sofort/sofort.h +++ b/include/sofort/sofort.h @@ -109,7 +109,6 @@ sfrt_api const struct sfrt_source_version * sfrt_source_version(void); /* driver api */ sfrt_api int sfrt_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, struct sfrt_driver_ctx **); -sfrt_api int sfrt_create_driver_ctx (const struct sfrt_common_ctx *, struct sfrt_driver_ctx **); sfrt_api void sfrt_free_driver_ctx (struct sfrt_driver_ctx *); sfrt_api int sfrt_get_unit_ctx (const struct sfrt_driver_ctx *, const char * path, struct sfrt_unit_ctx **); diff --git a/src/driver/sfrt_driver_ctx.c b/src/driver/sfrt_driver_ctx.c index 3920049..fc3ea3a 100644 --- a/src/driver/sfrt_driver_ctx.c +++ b/src/driver/sfrt_driver_ctx.c @@ -168,29 +168,6 @@ int sfrt_get_driver_ctx( return SFRT_OK; } -int sfrt_create_driver_ctx( - const struct sfrt_common_ctx * cctx, - struct sfrt_driver_ctx ** pctx) -{ - const struct argv_option * optv[SFRT_OPTV_ELEMENTS]; - struct argv_meta * meta; - struct sfrt_driver_ctx_impl * ctx; - char * argv[] = {"sofort_driver",0}; - - argv_optv_init(sfrt_default_options,optv); - - if (!(meta = argv_get(argv,optv,0,STDERR_FILENO))) - return -1; - - if (!(ctx = sfrt_driver_ctx_alloc(meta,cctx,0))) - return sfrt_get_driver_ctx_fail(0); - - ctx->ctx.cctx = &ctx->cctx; - memcpy(&ctx->cctx,cctx,sizeof(*cctx)); - *pctx = &ctx->ctx; - return SFRT_OK; -} - static void sfrt_free_driver_ctx_impl(struct sfrt_driver_ctx_alloc * ictx) { argv_free(ictx->meta); |