summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/tpax_amain.c3
-rw-r--r--src/driver/tpax_driver_ctx.c22
2 files changed, 20 insertions, 5 deletions
diff --git a/src/driver/tpax_amain.c b/src/driver/tpax_amain.c
index f71f16c..84b15f4 100644
--- a/src/driver/tpax_amain.c
+++ b/src/driver/tpax_amain.c
@@ -12,7 +12,8 @@
#ifndef TPAX_DRIVER_FLAGS
#define TPAX_DRIVER_FLAGS TPAX_DRIVER_VERBOSITY_ERRORS \
- | TPAX_DRIVER_VERBOSITY_USAGE
+ | TPAX_DRIVER_VERBOSITY_USAGE \
+ | TPAX_DRIVER_DIR_MEMBER_RECURSE
#endif
static const char vermsg[] = "%s%s%s (https://git.foss21.org/tpax): "
diff --git a/src/driver/tpax_driver_ctx.c b/src/driver/tpax_driver_ctx.c
index 81c4e34..d8e2de8 100644
--- a/src/driver/tpax_driver_ctx.c
+++ b/src/driver/tpax_driver_ctx.c
@@ -83,10 +83,10 @@ static int tpax_driver_usage(
snprintf(header,sizeof(header),
"%s — topological pax implementation\n\n"
"Synopsis:\n"
- " %s\n"
- " %s -r\n"
- " %s -w [−x format] [-b blocksize]\n"
- " %s -r -w\n\n"
+ " %s [-d]\n"
+ " %s -r [-d]\n"
+ " %s -w [−x format] [-b blocksize] [-d]\n"
+ " %s -r -w [-d]\n\n"
"Options:\n",
program,program,program,program,program);
@@ -395,6 +395,14 @@ int tpax_get_driver_ctx(
program,entry->arg,
optv,meta);
break;
+
+ case TAG_RECURSE:
+ cctx.drvflags |= TPAX_DRIVER_DIR_MEMBER_RECURSE;
+ break;
+
+ case TAG_NORECURSE:
+ cctx.drvflags &= ~(uintptr_t)TPAX_DRIVER_DIR_MEMBER_RECURSE;
+ break;
}
} else {
operand = entry;
@@ -500,6 +508,12 @@ int tpax_get_driver_ctx(
break;
}
+ /* not implemented features */
+ if (cctx.drvflags & TPAX_DRIVER_EXEC_MODE_MASK)
+ if (cctx.drvflags & TPAX_DRIVER_DIR_MEMBER_RECURSE)
+ return tpax_driver_error_not_implemented(
+ fdctx->fderr,program,"directory recursion",meta);
+
/* driver ctx */
if (!(ctx = tpax_driver_ctx_alloc(meta,fdctx,&cctx,nunits))) {
if (cctx.drvflags & TPAX_DRIVER_EXEC_MODE_COPY)