summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-07-18 03:30:36 +0000
committermidipix <writeonce@midipix.org>2024-07-18 05:08:24 +0000
commitdf2d16faa681af8770e63c5e3f9307ba12bd9685 (patch)
tree198382f12408d687af21dd1e6b3e394b33d3686a /src
parent2569fba5f0afcdb5c459e76e1d11a15191af0a37 (diff)
downloadtpax-df2d16faa681af8770e63c5e3f9307ba12bd9685.tar.bz2
tpax-df2d16faa681af8770e63c5e3f9307ba12bd9685.tar.xz
library api's: defined source data flags.
Diffstat (limited to 'src')
-rw-r--r--src/driver/tpax_driver_ctx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/driver/tpax_driver_ctx.c b/src/driver/tpax_driver_ctx.c
index 6a5f882..4ad7fe6 100644
--- a/src/driver/tpax_driver_ctx.c
+++ b/src/driver/tpax_driver_ctx.c
@@ -818,6 +818,8 @@ int tpax_lib_get_driver_ctx(
} else if (archive) {
memcpy(&lfdctx,fdctx,sizeof(*fdctx));
+ cctx.srcflags = TPAX_SOURCE_DATA_PENDING;
+
lfdctx.fdin = openat(
fdctx->fdcwd,
archive->arg,
@@ -829,7 +831,15 @@ int tpax_lib_get_driver_ctx(
program,archive->arg,
meta,false);
+ cctx.srcflags = TPAX_SOURCE_DATA_OPENED;
+
fdctx = &lfdctx;
+
+ } else if (cctx.drvflags & TPAX_DRIVER_EXEC_MODE_WRITE) {
+ cctx.srcflags = TPAX_SOURCE_DATA_NONE;
+
+ } else {
+ cctx.srcflags = TPAX_SOURCE_DATA_PENDING;
}
/* not implemented mode(s) */