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