summaryrefslogtreecommitdiffhomepage
path: root/src/logic/tpax_archive_enqueue.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-06-09 04:29:32 +0000
committermidipix <writeonce@midipix.org>2024-06-09 04:38:30 +0000
commit4275a94c9d0e8ab2dee4632b6bee32fd634f4460 (patch)
tree410c00282c054880e1590df15759f34920f5029f /src/logic/tpax_archive_enqueue.c
parentf9e2cb296c7939daf67133cfe5bc4843241a2346 (diff)
downloadtpax-4275a94c9d0e8ab2dee4632b6bee32fd634f4460.tar.bz2
tpax-4275a94c9d0e8ab2dee4632b6bee32fd634f4460.tar.xz
driver: implemented and integrated the -X (strict device id) cmdline option.
Diffstat (limited to 'src/logic/tpax_archive_enqueue.c')
-rw-r--r--src/logic/tpax_archive_enqueue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/logic/tpax_archive_enqueue.c b/src/logic/tpax_archive_enqueue.c
index 0d8c28f..8685cad 100644
--- a/src/logic/tpax_archive_enqueue.c
+++ b/src/logic/tpax_archive_enqueue.c
@@ -304,6 +304,11 @@ static int tpax_archive_enqueue_dir_entries(
TPAX_CUSTOM_ERROR(dctx,TPAX_ERR_FLOW_ERROR),
uctx);
+ /* ensure physical device identity as needed */
+ if (dctx->cctx->drvflags & TPAX_DRIVER_STRICT_DEVICE_ID)
+ if (dent->parent && (uctx->st->st_dev != dent->parent->stdev))
+ return 0;
+
/* obtain buffer for file-system directory entries */
dirents = tpax_get_driver_getdents_buffer(dctx);
dirent = dirents;