diff options
author | midipix <writeonce@midipix.org> | 2024-07-16 04:10:40 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-07-16 04:10:40 +0000 |
commit | eba861e4ed34d46cd7925b4075d00f0f556afc2b (patch) | |
tree | b75fc3aedf43afc3b5b0006dca25054ad4843d35 /src | |
parent | d81c573b1b55a210015cc2286c886202ad15ac71 (diff) | |
download | tpax-eba861e4ed34d46cd7925b4075d00f0f556afc2b.tar.bz2 tpax-eba861e4ed34d46cd7925b4075d00f0f556afc2b.tar.xz |
tpax_archive_add_queue_item(): also record the system st_rdev information.
Diffstat (limited to 'src')
-rw-r--r-- | src/internal/tpax_driver_impl.h | 1 | ||||
-rw-r--r-- | src/logic/tpax_archive_enqueue.c | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/internal/tpax_driver_impl.h b/src/internal/tpax_driver_impl.h index 8251fb0..7726e1f 100644 --- a/src/internal/tpax_driver_impl.h +++ b/src/internal/tpax_driver_impl.h @@ -64,6 +64,7 @@ struct tpax_dirent { int fdat; int depth; int flags; + dev_t srdev; dev_t stdev; ino_t stino; size_t nsize; diff --git a/src/logic/tpax_archive_enqueue.c b/src/logic/tpax_archive_enqueue.c index edab132..917c8ca 100644 --- a/src/logic/tpax_archive_enqueue.c +++ b/src/logic/tpax_archive_enqueue.c @@ -192,6 +192,7 @@ static int tpax_archive_add_queue_item( const struct dirent * dirent, const struct tpax_dirent * parent, const char * prefix, + dev_t srdev, dev_t stdev, ino_t stino, int depth, @@ -233,6 +234,7 @@ static int tpax_archive_add_queue_item( cdent->fdat = fdat; cdent->depth = depth; cdent->flags = flags; + cdent->srdev = srdev; cdent->stdev = stdev; cdent->stino = stino; cdent->nsize = needed; @@ -367,7 +369,9 @@ static int tpax_archive_enqueue_dir_entries( if (tpax_archive_add_queue_item( dctx,dirent,dent,0, - st.st_dev,st.st_ino,depth, + st.st_rdev, + st.st_dev,st.st_ino, + depth, TPAX_ITEM_IMPLICIT, fd,&fkeep) < 0) return tpax_archive_enqueue_ret( @@ -406,7 +410,9 @@ static int tpax_archive_enqueue_dir_entries( if (tpax_archive_add_queue_item( dctx,lnkent,cdent,0, - lnkst.st_dev,lnkst.st_ino,depth+1, + lnkst.st_rdev, + lnkst.st_dev,lnkst.st_ino, + depth+1, TPAX_ITEM_IMPLICIT|TPAX_ITEM_SYMLINK, fd,&fkeep) < 0) return tpax_archive_enqueue_ret( @@ -517,6 +523,7 @@ int tpax_archive_enqueue( /* add to queue */ if (tpax_archive_add_queue_item( dctx,dirent,0,prefix, + uctx->st->st_rdev, uctx->st->st_dev, uctx->st->st_ino,0, TPAX_ITEM_EXPLICIT, @@ -551,7 +558,9 @@ int tpax_archive_enqueue( if (tpax_archive_add_queue_item( dctx,lnkent,cdent,0, - lnkst.st_dev,lnkst.st_ino,1, + lnkst.st_rdev, + lnkst.st_dev,lnkst.st_ino, + 1, TPAX_ITEM_EXPLICIT|TPAX_ITEM_SYMLINK, fdat,&fkeep) < 0) return tpax_archive_enqueue_ret( |