Age | Commit message (Collapse) | Author |
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Exact operation performed:
git ls-files -z | \
xargs -0 sed -i -e 's/dir_entry_t/sqfs_dir_entry_t/g
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
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>
|
|
The fstree_mknode function is only used internally, remove the
declaration from the header and internalize it. The code using it is
consolidated into fstree.c.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Piece together the prefix path and pass it to the iterator. That way,
we get the full target paths back from the iterator and can use those
directly in the callback for filtering.
We also no longer need the root node for fstree_from_dir (always tree
root) and the callback can no longer return an error state.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Using depth-first search, we collect some crude statistics about
directory tree types (e.g. regular files, directories, device special
files and so on) and print them out after serializing the tree.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of adding special sentinel modes, simply treat hard links as
special case of symlinks, setting a flag to indicate that it is a
hard link and another flag to indicate that it has been resolved.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Use the next_by_type pointer to create a list of all unresolved
hard links and iterate over that list for link resolution.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of having a file_info_t next pointer, requiring an up-cast
to tree_node_t all the time, simply add a "next_by_type" pointer to
the tree node itself, which can also be used for other purposes by
other node types and removes the need for up-casting.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
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>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
We do not allow hard links to directories, so we can toss the special
case handling code for that. The visited mechanism was pointless
anyway, because we don't even descend down hard links in the recursive
tree handling functions.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
For some reason, the recursive hardlink resolution ended up in post
process, calling into the non recrusive one in hardlink.c that wasn't
used elsewhere.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|