summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-07-15 16:35:50 +0000
committermidipix <writeonce@midipix.org>2024-07-16 04:05:54 +0000
commitd81c573b1b55a210015cc2286c886202ad15ac71 (patch)
treeb1f88b5c12c8c0555881d81170bc7792724025ed /src
parent7c125b3a37d91a20813402a7463b05bfb38a027f (diff)
downloadtpax-d81c573b1b55a210015cc2286c886202ad15ac71.tar.bz2
tpax-d81c573b1b55a210015cc2286c886202ad15ac71.tar.xz
tpax_archive_add_queue_item(): also record the system (stat) inode information.
Diffstat (limited to 'src')
-rw-r--r--src/internal/tpax_driver_impl.h1
-rw-r--r--src/logic/tpax_archive_enqueue.c11
2 files changed, 8 insertions, 4 deletions
diff --git a/src/internal/tpax_driver_impl.h b/src/internal/tpax_driver_impl.h
index 3df8244..8251fb0 100644
--- a/src/internal/tpax_driver_impl.h
+++ b/src/internal/tpax_driver_impl.h
@@ -65,6 +65,7 @@ struct tpax_dirent {
int depth;
int flags;
dev_t stdev;
+ ino_t stino;
size_t nsize;
const char * prefix;
const struct tpax_dirent * parent;
diff --git a/src/logic/tpax_archive_enqueue.c b/src/logic/tpax_archive_enqueue.c
index 8685cad..edab132 100644
--- a/src/logic/tpax_archive_enqueue.c
+++ b/src/logic/tpax_archive_enqueue.c
@@ -193,6 +193,7 @@ static int tpax_archive_add_queue_item(
const struct tpax_dirent * parent,
const char * prefix,
dev_t stdev,
+ ino_t stino,
int depth,
int flags,
int fdat,
@@ -233,6 +234,7 @@ static int tpax_archive_add_queue_item(
cdent->depth = depth;
cdent->flags = flags;
cdent->stdev = stdev;
+ cdent->stino = stino;
cdent->nsize = needed;
cdent->parent = parent;
cdent->prefix = prefix;
@@ -365,7 +367,7 @@ static int tpax_archive_enqueue_dir_entries(
if (tpax_archive_add_queue_item(
dctx,dirent,dent,0,
- st.st_dev,depth,
+ st.st_dev,st.st_ino,depth,
TPAX_ITEM_IMPLICIT,
fd,&fkeep) < 0)
return tpax_archive_enqueue_ret(
@@ -404,7 +406,7 @@ static int tpax_archive_enqueue_dir_entries(
if (tpax_archive_add_queue_item(
dctx,lnkent,cdent,0,
- lnkst.st_dev,depth+1,
+ lnkst.st_dev,lnkst.st_ino,depth+1,
TPAX_ITEM_IMPLICIT|TPAX_ITEM_SYMLINK,
fd,&fkeep) < 0)
return tpax_archive_enqueue_ret(
@@ -515,7 +517,8 @@ int tpax_archive_enqueue(
/* add to queue */
if (tpax_archive_add_queue_item(
dctx,dirent,0,prefix,
- uctx->st->st_dev,0,
+ uctx->st->st_dev,
+ uctx->st->st_ino,0,
TPAX_ITEM_EXPLICIT,
fdat,&fkeep) < 0)
return tpax_archive_enqueue_ret(
@@ -548,7 +551,7 @@ int tpax_archive_enqueue(
if (tpax_archive_add_queue_item(
dctx,lnkent,cdent,0,
- lnkst.st_dev,1,
+ lnkst.st_dev,lnkst.st_ino,1,
TPAX_ITEM_EXPLICIT|TPAX_ITEM_SYMLINK,
fdat,&fkeep) < 0)
return tpax_archive_enqueue_ret(