diff options
author | midipix <writeonce@midipix.org> | 2024-07-17 22:30:14 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-07-17 22:30:14 +0000 |
commit | 2569fba5f0afcdb5c459e76e1d11a15191af0a37 (patch) | |
tree | a50d7a40371d51bc71dd08e52cdfae424bd7ebbe /src/logic | |
parent | 9644eea648c0c11ac1929cdf23682f43e44b2732 (diff) | |
download | tpax-2569fba5f0afcdb5c459e76e1d11a15191af0a37.tar.bz2 tpax-2569fba5f0afcdb5c459e76e1d11a15191af0a37.tar.xz |
tpax_archive_add_queue_item(): record actual st_rdev only with DT_CHR & DT_BLK.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/tpax_archive_enqueue.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/logic/tpax_archive_enqueue.c b/src/logic/tpax_archive_enqueue.c index 917c8ca..7d8c278 100644 --- a/src/logic/tpax_archive_enqueue.c +++ b/src/logic/tpax_archive_enqueue.c @@ -234,13 +234,22 @@ 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; cdent->parent = parent; cdent->prefix = prefix; + switch (dirent->d_type) { + case DT_CHR: + case DT_BLK: + cdent->srdev = srdev; + break; + + default: + cdent->srdev = 0777777; + } + memset(&cdent->dirent,0,offsetof(struct dirent,d_name)); cdent->dirent.d_ino = dirent->d_ino; |