diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-05-29 20:16:38 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-05-30 14:47:14 +0200 |
commit | 50b67940c793e72656787469ced6e0245bb580b4 (patch) | |
tree | a35e728c1b5193867bba61747b4410898fd40ce2 /include | |
parent | 926987f338f7b3aba99dc25afd442ddd3e70d16d (diff) |
libfstree: accept dir_entry_t instead of path and struct stat
Because the dir_entry_t also has a flag for had links, the regular
node and hard-link node interface can be unified. This simplifies
the users of libfstree (gensquashfs, tar2sqfs) since we can simply
hose the entries from an iterator directly into the tree.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r-- | include/fstree.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/fstree.h b/include/fstree.h index 83b7737..55f0928 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -15,6 +15,7 @@ #include <stdio.h> #include "sqfs/predef.h" +#include "io/dir_iterator.h" #include "io/istream.h" #include "compat.h" @@ -141,8 +142,8 @@ void fstree_cleanup(fstree_t *fs); This function does not print anything to stderr, instead it sets an appropriate errno value. Internally it uses fstree_mknode to create the node. */ -tree_node_t *fstree_add_generic(fstree_t *fs, const char *path, - const struct stat *sb, const char *extra); +tree_node_t *fstree_add_generic(fstree_t *fs, const dir_entry_t *ent, + const char *extra); /* This function performs all the necessary post processing steps on the file @@ -183,12 +184,6 @@ tree_node_t *fstree_get_node_by_path(fstree_t *fs, tree_node_t *root, bool stop_at_parent); /* - Add a hard link node. Returns NULL on failure and sets errno. - */ -tree_node_t *fstree_add_hard_link(fstree_t *fs, const char *path, - const char *target); - -/* Try to resolve all hard links in the tree. Returns 0 on success. On failure, errno is set. |