diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-07-02 19:50:05 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-07-10 09:22:04 +0200 |
commit | e7ecb1f92ae618a56ee8eabb6cbf98365de3695a (patch) | |
tree | 8d6d53df2c1654ecf5f4c587d8b7b2592a68c4f2 /lib/tar | |
parent | ec593e0b94656a5481f82ee0f33728ced297ac48 (diff) |
Move sqfs_dir_entry_t code from libio into libsquashfs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar')
-rw-r--r-- | lib/tar/src/iterator.c | 5 | ||||
-rw-r--r-- | lib/tar/test/tar_iterator3.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/tar/src/iterator.c b/lib/tar/src/iterator.c index b11be77..6b456d6 100644 --- a/lib/tar/src/iterator.c +++ b/lib/tar/src/iterator.c @@ -209,7 +209,7 @@ retry: return tar->state; } - *out = dir_entry_create(tar->current.name); + *out = sqfs_dir_entry_create(tar->current.name, tar->current.mode, 0); if ((*out) == NULL) { tar->state = SQFS_ERROR_ALLOC; return tar->state; @@ -219,11 +219,10 @@ retry: (*out)->rdev = tar->current.devno; (*out)->uid = tar->current.uid; (*out)->gid = tar->current.gid; - (*out)->mode = tar->current.mode; if (tar->current.is_hard_link) { (*out)->mode = (S_IFLNK | 0777); - (*out)->flags |= DIR_ENTRY_FLAG_HARD_LINK; + (*out)->flags |= SQFS_DIR_ENTRY_FLAG_HARD_LINK; } if (S_ISREG((*out)->mode)) diff --git a/lib/tar/test/tar_iterator3.c b/lib/tar/test/tar_iterator3.c index 36a9060..f8d0bda 100644 --- a/lib/tar/test/tar_iterator3.c +++ b/lib/tar/test/tar_iterator3.c @@ -151,7 +151,7 @@ int main(int argc, char **argv) "20CharsForLnkTest003/20CharsForLnkTest004/" "01234567890123456789"); TEST_EQUAL_UI(ent->mode, S_IFLNK | 0777); - TEST_ASSERT((ent->flags & DIR_ENTRY_FLAG_HARD_LINK) != 0); + TEST_ASSERT((ent->flags & SQFS_DIR_ENTRY_FLAG_HARD_LINK) != 0); free(ent); ret = it->read_link(it, &link); |