From f572a1ed601267438c34c61a201ae1ab051da7a3 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 15 Jul 2023 14:51:20 +0200 Subject: Refactor: rename dir_iterator_t to sqfs_dir_iterator_t Signed-off-by: David Oberhollenzer --- bin/tar2sqfs/src/process_tarball.c | 14 ++++++++------ bin/tar2sqfs/src/tar2sqfs.c | 2 +- bin/tar2sqfs/src/tar2sqfs.h | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'bin/tar2sqfs/src') diff --git a/bin/tar2sqfs/src/process_tarball.c b/bin/tar2sqfs/src/process_tarball.c index 331936d..3b9365d 100644 --- a/bin/tar2sqfs/src/process_tarball.c +++ b/bin/tar2sqfs/src/process_tarball.c @@ -6,7 +6,7 @@ */ #include "tar2sqfs.h" -static int write_file(sqfs_writer_t *sqfs, dir_iterator_t *it, +static int write_file(sqfs_writer_t *sqfs, sqfs_dir_iterator_t *it, const sqfs_dir_entry_t *ent, tree_node_t *n) { int flags = 0, ret = 0; @@ -40,7 +40,7 @@ static int write_file(sqfs_writer_t *sqfs, dir_iterator_t *it, } static int copy_xattr(sqfs_writer_t *sqfs, const char *filename, - tree_node_t *node, dir_iterator_t *it) + tree_node_t *node, sqfs_dir_iterator_t *it) { sqfs_xattr_t *xattr, *list; int ret; @@ -91,8 +91,10 @@ fail: return -1; } -static int create_node_and_repack_data(sqfs_writer_t *sqfs, dir_iterator_t *it, - const sqfs_dir_entry_t *ent, const char *link) +static int create_node_and_repack_data(sqfs_writer_t *sqfs, + sqfs_dir_iterator_t *it, + const sqfs_dir_entry_t *ent, + const char *link) { tree_node_t *node; @@ -127,7 +129,7 @@ fail_errno: return -1; } -static int set_root_attribs(sqfs_writer_t *sqfs, dir_iterator_t *it, +static int set_root_attribs(sqfs_writer_t *sqfs, sqfs_dir_iterator_t *it, const sqfs_dir_entry_t *ent) { if ((ent->flags & SQFS_DIR_ENTRY_FLAG_HARD_LINK) || !S_ISDIR(ent->mode)) { @@ -150,7 +152,7 @@ static int set_root_attribs(sqfs_writer_t *sqfs, dir_iterator_t *it, return 0; } -int process_tarball(dir_iterator_t *it, sqfs_writer_t *sqfs) +int process_tarball(sqfs_dir_iterator_t *it, sqfs_writer_t *sqfs) { size_t rootlen = root_becomes == NULL ? 0 : strlen(root_becomes); diff --git a/bin/tar2sqfs/src/tar2sqfs.c b/bin/tar2sqfs/src/tar2sqfs.c index ae8b548..acb42e2 100644 --- a/bin/tar2sqfs/src/tar2sqfs.c +++ b/bin/tar2sqfs/src/tar2sqfs.c @@ -10,7 +10,7 @@ int main(int argc, char **argv) { sqfs_istream_t *input_file = NULL; tar_iterator_opts topts = { 0 }; - dir_iterator_t *tar = NULL; + sqfs_dir_iterator_t *tar = NULL; int status = EXIT_FAILURE; sqfs_writer_t sqfs; int ret; diff --git a/bin/tar2sqfs/src/tar2sqfs.h b/bin/tar2sqfs/src/tar2sqfs.h index 5dcfad7..d2049f2 100644 --- a/bin/tar2sqfs/src/tar2sqfs.h +++ b/bin/tar2sqfs/src/tar2sqfs.h @@ -35,6 +35,6 @@ extern size_t num_excludedirs; void process_args(int argc, char **argv); /* process_tarball.c */ -int process_tarball(dir_iterator_t *it, sqfs_writer_t *sqfs); +int process_tarball(sqfs_dir_iterator_t *it, sqfs_writer_t *sqfs); #endif /* TAR2SQFS_H */ -- cgit v1.2.3