aboutsummaryrefslogtreecommitdiff
path: root/lib/io/test/dir_iterator.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-07-15 17:13:48 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-08-10 09:28:27 +0200
commit0a1d93062463133e6f40e3398c0fe53371c47ab0 (patch)
treeee289539381c33a3ae3a24098907ed87686a7c94 /lib/io/test/dir_iterator.c
parentf572a1ed601267438c34c61a201ae1ab051da7a3 (diff)
Move dir_iterator_t from libio into libsquashfs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/io/test/dir_iterator.c')
-rw-r--r--lib/io/test/dir_iterator.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/io/test/dir_iterator.c b/lib/io/test/dir_iterator.c
index 013e41e..56610b6 100644
--- a/lib/io/test/dir_iterator.c
+++ b/lib/io/test/dir_iterator.c
@@ -40,7 +40,8 @@ int main(int argc, char **argv)
(void)argc; (void)argv;
/* scan the top level hierarchy */
- dir = dir_iterator_create(TEST_PATH);
+ ret = sqfs_dir_iterator_create_native(&dir, TEST_PATH, 0);
+ TEST_EQUAL_I(ret, 0);
TEST_NOT_NULL(dir);
ret = dir->next(dir, &ent[0]);
@@ -86,7 +87,8 @@ int main(int argc, char **argv)
free(ent[i]);
/* scan first sub hierarchy */
- dir = dir_iterator_create(TEST_PATH "/dira");
+ ret = sqfs_dir_iterator_create_native(&dir, TEST_PATH "/dira", 0);
+ TEST_EQUAL_I(ret, 0);
TEST_NOT_NULL(dir);
ret = dir->next(dir, &ent[0]);
@@ -132,7 +134,8 @@ int main(int argc, char **argv)
free(ent[i]);
/* scan second sub hierarchy */
- dir = dir_iterator_create(TEST_PATH "/dirb");
+ ret = sqfs_dir_iterator_create_native(&dir, TEST_PATH "/dirb", 0);
+ TEST_EQUAL_I(ret, 0);
TEST_NOT_NULL(dir);
ret = dir->next(dir, &ent[0]);
@@ -184,7 +187,8 @@ int main(int argc, char **argv)
free(ent[i]);
/* scan first sub hierarchy */
- dir = dir_iterator_create(TEST_PATH "/dirc");
+ ret = sqfs_dir_iterator_create_native(&dir, TEST_PATH "/dirc", 0);
+ TEST_EQUAL_I(ret, 0);
TEST_NOT_NULL(dir);
ret = dir->next(dir, &ent[0]);
@@ -234,7 +238,8 @@ int main(int argc, char **argv)
subb = NULL;
subc = NULL;
- dir = dir_iterator_create(TEST_PATH);
+ ret = sqfs_dir_iterator_create_native(&dir, TEST_PATH, 0);
+ TEST_EQUAL_I(ret, 0);
TEST_NOT_NULL(dir);
for (i = 0; i < 5; ++i) {