summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/tpax_amain.c7
-rw-r--r--src/driver/tpax_driver_ctx.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/driver/tpax_amain.c b/src/driver/tpax_amain.c
index 84b15f4..d94eaf0 100644
--- a/src/driver/tpax_amain.c
+++ b/src/driver/tpax_amain.c
@@ -52,8 +52,8 @@ static void tpax_perform_unit_actions(
const struct tpax_driver_ctx * dctx,
struct tpax_unit_ctx * uctx)
{
- (void)dctx;
- (void)uctx;
+ if (dctx->cctx->drvflags & TPAX_DRIVER_EXEC_MODE_WRITE)
+ tpax_archive_append(dctx,uctx);
}
static int tpax_exit(struct tpax_driver_ctx * dctx, int ret)
@@ -91,5 +91,8 @@ int tpax_main(char ** argv, char ** envp, const struct tpax_fd_ctx * fdctx)
}
}
+ if ((dctx->cctx->drvflags & TPAX_DRIVER_EXEC_MODE_WRITE) && dctx->units[0])
+ tpax_archive_seal(dctx);
+
return tpax_exit(dctx,dctx->errv[0] ? TPAX_ERROR : TPAX_OK);
}
diff --git a/src/driver/tpax_driver_ctx.c b/src/driver/tpax_driver_ctx.c
index 926eb07..4f533cc 100644
--- a/src/driver/tpax_driver_ctx.c
+++ b/src/driver/tpax_driver_ctx.c
@@ -487,10 +487,6 @@ int tpax_get_driver_ctx(
return tpax_driver_error_not_implemented(
fdctx->fderr,program,"read mode",meta);
- case TPAX_DRIVER_EXEC_MODE_WRITE:
- return tpax_driver_error_not_implemented(
- fdctx->fderr,program,"write mode",meta);
-
case TPAX_DRIVER_EXEC_MODE_COPY:
close(fddst);