diff options
author | midipix <writeonce@midipix.org> | 2016-10-25 23:44:29 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-10-25 23:44:29 -0400 |
commit | 3be86d2cc36db6b3fea94a35c1c61fca8c087aff (patch) | |
tree | 196094a6351aabffb308ba8300368d8da36aeb43 /src | |
parent | 1626010f3e7f8e00daeec49aac9bc940ace46b12 (diff) | |
download | sofort-3be86d2cc36db6b3fea94a35c1c61fca8c087aff.tar.bz2 sofort-3be86d2cc36db6b3fea94a35c1c61fca8c087aff.tar.xz |
struct sfrt_unit_ctx: removed cctx (pass pointer to driver context instead).
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/sfrt_amain.c | 8 | ||||
-rw-r--r-- | src/driver/sfrt_unit_ctx.c | 4 | ||||
-rw-r--r-- | src/internal/sofort_driver_impl.h | 1 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/driver/sfrt_amain.c b/src/driver/sfrt_amain.c index 3766b67..ebed412 100644 --- a/src/driver/sfrt_amain.c +++ b/src/driver/sfrt_amain.c @@ -39,9 +39,11 @@ static ssize_t sfrt_version(struct sfrt_driver_ctx * dctx) verclr[4],verinfo->commit,verclr[5]); } -static void sfrt_perform_unit_actions(struct sfrt_unit_ctx * uctx) +static void sfrt_perform_unit_actions( + const struct sfrt_driver_ctx * dctx, + struct sfrt_unit_ctx * uctx) { - uint64_t flags = uctx->cctx->actflags; /* dummy */ + uint64_t flags = dctx->cctx->actflags; /* dummy */ /* dummy */ if (flags & SFRT_OUTPUT_NAME) { /* dummy */ uctx->status = sfrt_output_name(uctx,stdout); /* dummy */ @@ -81,7 +83,7 @@ int sfrt_main(int argc, char ** argv, char ** envp) /* dummy */ for (unit=dctx->units; *unit; unit++) { if (!(sfrt_get_unit_ctx(dctx,*unit,&uctx))) { - sfrt_perform_unit_actions(uctx); + sfrt_perform_unit_actions(dctx,uctx); ret += uctx->nerrors; sfrt_free_unit_ctx(uctx); } diff --git a/src/driver/sfrt_unit_ctx.c b/src/driver/sfrt_unit_ctx.c index 0052cce..630fdba 100644 --- a/src/driver/sfrt_unit_ctx.c +++ b/src/driver/sfrt_unit_ctx.c @@ -39,14 +39,10 @@ int sfrt_get_unit_ctx( return sfrt_free_unit_ctx_impl(ctx, SFRT_NESTED_ERROR(dctx)); - memcpy(&ctx->cctx,dctx->cctx, - sizeof(ctx->cctx)); - ctx->path = path; ctx->uctx.path = &ctx->path; ctx->uctx.map = &ctx->map; - ctx->uctx.cctx = &ctx->cctx; *pctx = &ctx->uctx; return 0; diff --git a/src/internal/sofort_driver_impl.h b/src/internal/sofort_driver_impl.h index 1322aac..d6d2e44 100644 --- a/src/internal/sofort_driver_impl.h +++ b/src/internal/sofort_driver_impl.h @@ -31,7 +31,6 @@ struct sfrt_driver_ctx_impl { struct sfrt_unit_ctx_impl { const char * path; struct sfrt_input map; - struct sfrt_common_ctx cctx; struct sfrt_unit_ctx uctx; }; |