diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-04-19 08:51:26 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-04-19 11:17:51 +0200 |
commit | 75fb524b5702bca4f8467309f7d95f9937ec6683 (patch) | |
tree | b47a037c0f24873a9fc5b3f5b08583c9ad90de08 /bin/gensquashfs/test/fstree_from_file.c | |
parent | a13df03fddd9499960d4653aaee0970983b65f73 (diff) |
libfstree: get rid of dir_info_t
The single boolean created_implicitly can be replaced with a general
purpose flag field. The "children" pointer can then be hoisted directly
into the data union of tree_node_t.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/gensquashfs/test/fstree_from_file.c')
-rw-r--r-- | bin/gensquashfs/test/fstree_from_file.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/gensquashfs/test/fstree_from_file.c b/bin/gensquashfs/test/fstree_from_file.c index e526f2d..03591d5 100644 --- a/bin/gensquashfs/test/fstree_from_file.c +++ b/bin/gensquashfs/test/fstree_from_file.c @@ -21,7 +21,7 @@ int main(int argc, char **argv) TEST_ASSERT(fstree_from_file(&fs, TEST_PATH, NULL) == 0); fstree_post_process(&fs); - n = fs.root->data.dir.children; + n = fs.root->data.children; TEST_EQUAL_UI(fs.root->link_count, 9); TEST_EQUAL_UI(fs.root->mode, S_IFDIR | 0755); @@ -49,7 +49,7 @@ int main(int argc, char **argv) TEST_EQUAL_UI(n->gid, 5); TEST_EQUAL_UI(n->link_count, 2); TEST_STR_EQUAL(n->name, "dir"); - TEST_NULL(n->data.dir.children); + TEST_NULL(n->data.children); n = n->next; TEST_EQUAL_UI(n->mode, S_IFDIR | 0755); @@ -57,15 +57,15 @@ int main(int argc, char **argv) TEST_EQUAL_UI(n->gid, 0); TEST_EQUAL_UI(n->link_count, 3); TEST_STR_EQUAL(n->name, "foo bar"); - TEST_NOT_NULL(n->data.dir.children); + TEST_NOT_NULL(n->data.children); - TEST_NULL(n->data.dir.children->next); - TEST_EQUAL_UI(n->data.dir.children->mode, S_IFDIR | 0755); - TEST_EQUAL_UI(n->data.dir.children->uid, 0); - TEST_EQUAL_UI(n->data.dir.children->gid, 0); - TEST_EQUAL_UI(n->data.dir.children->link_count, 2); - TEST_STR_EQUAL(n->data.dir.children->name, " test \""); - TEST_NULL(n->data.dir.children->data.dir.children); + TEST_NULL(n->data.children->next); + TEST_EQUAL_UI(n->data.children->mode, S_IFDIR | 0755); + TEST_EQUAL_UI(n->data.children->uid, 0); + TEST_EQUAL_UI(n->data.children->gid, 0); + TEST_EQUAL_UI(n->data.children->link_count, 2); + TEST_STR_EQUAL(n->data.children->name, " test \""); + TEST_NULL(n->data.children->data.children); n = n->next; TEST_EQUAL_UI(n->mode, S_IFIFO | 0644); |