Age | Commit message (Collapse) | Author |
|
If the hard link counter or the inode number counter overflow the
maximum representable value (for SquashFS 16 bit and 32 bit
respecitively), abort with an error message.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- For now, enforce that hard links don't point to a directories.
- Instead of doing the swaping trickery, just reorder the flat list
and hand out new inode numbers.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- Remove unnecessary counter argument, we already have the
total count.
- Remove the return status, there is no failure branch.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
It makes further processing simpler and doesn't leak the abstraction
into upper layers.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
In libfstree, add a function to add a hard link to the fstree. The
hard links stores the target in the data.target field, canonicalizes
the target and sets a sentinel mode. A second function is used to
resolve link, i.e. replacing it with a direct pointer, setting another
sentinel mode and increasing the targets link count.
The post process function tries to resolve unresolved hard links and
only allocates inode numbers for nodes that aren't hard links. If the
target node of a hard link does not have an inode number yet, the two
need to be swapped, since this is also the order in which they are
serialized.
The serialization function in libcommon simply has to skip hard link
nodes and when writing directory entries, use the inode num/ref of
the target node.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of having 3 different functions for sorting the tree, numbering
the nodes and generating a file list, that all have to be used in the
right order, this commit merges them into a single "fstree_post_process"
function.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|