From 4275a94c9d0e8ab2dee4632b6bee32fd634f4460 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 9 Jun 2024 04:29:32 +0000 Subject: driver: implemented and integrated the -X (strict device id) cmdline option. --- src/logic/tpax_archive_enqueue.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/logic/tpax_archive_enqueue.c') 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; -- cgit v1.2.3