From df2d16faa681af8770e63c5e3f9307ba12bd9685 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 18 Jul 2024 03:30:36 +0000 Subject: library api's: defined source data flags. --- src/driver/tpax_driver_ctx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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) */ -- cgit v1.2.3