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/src | |
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/src')
-rw-r--r-- | bin/gensquashfs/src/dirscan_xattr.c | 2 | ||||
-rw-r--r-- | bin/gensquashfs/src/fstree_from_dir.c | 6 | ||||
-rw-r--r-- | bin/gensquashfs/src/mkfs.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/bin/gensquashfs/src/dirscan_xattr.c b/bin/gensquashfs/src/dirscan_xattr.c index 7d4e552..e39a868 100644 --- a/bin/gensquashfs/src/dirscan_xattr.c +++ b/bin/gensquashfs/src/dirscan_xattr.c @@ -189,7 +189,7 @@ static int xattr_xcan_dfs(const char *path_prefix, void *selinux_handle, } if (S_ISDIR(node->mode)) { - node = node->data.dir.children; + node = node->data.children; while (node != NULL) { if (xattr_xcan_dfs(path_prefix, selinux_handle, xwr, diff --git a/bin/gensquashfs/src/fstree_from_dir.c b/bin/gensquashfs/src/fstree_from_dir.c index 6b27fad..27576ac 100644 --- a/bin/gensquashfs/src/fstree_from_dir.c +++ b/bin/gensquashfs/src/fstree_from_dir.c @@ -54,10 +54,10 @@ static void discard_node(tree_node_t *root, tree_node_t *n) { tree_node_t *it; - if (n == root->data.dir.children) { - root->data.dir.children = n->next; + if (n == root->data.children) { + root->data.children = n->next; } else { - it = root->data.dir.children; + it = root->data.children; while (it != NULL && it->next != n) it = it->next; diff --git a/bin/gensquashfs/src/mkfs.c b/bin/gensquashfs/src/mkfs.c index c773dd7..eb9f33b 100644 --- a/bin/gensquashfs/src/mkfs.c +++ b/bin/gensquashfs/src/mkfs.c @@ -101,7 +101,7 @@ static int relabel_tree_dfs(const char *filename, sqfs_xattr_writer_t *xwr, free(path); if (S_ISDIR(n->mode)) { - for (n = n->data.dir.children; n != NULL; n = n->next) { + for (n = n->data.children; n != NULL; n = n->next) { if (relabel_tree_dfs(filename, xwr, n, selinux_handle)) return -1; } @@ -133,7 +133,7 @@ static void override_owner_dfs(const options_t *opt, tree_node_t *n) n->gid = opt->force_gid_value; if (S_ISDIR(n->mode)) { - for (n = n->data.dir.children; n != NULL; n = n->next) + for (n = n->data.children; n != NULL; n = n->next) override_owner_dfs(opt, n); } } |