Age | Commit message (Collapse) | Author |
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Add a generic one that reads and processes N bytes from an input
file descriptor.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This commit tries to make the block and fragment processing code a
lot more readable by simplifying it as follows.
The following pattern is used repeatedly:
- Try to compress a block
- Write the compressed if smaller (the original otherwise) to a file
- Print errors on the way
- Set the magic (1 << 24) flag if we wrote the original
- Increment the super block byte counter
=> Move that to a seperate function called "write_compressed"
=> Move the code to grow the fragment table is moved to a seperate function.
=> Clearing the fragment buffer is pointless, so remove that
The add_fragment/add_block functions are now trivial
=> Merge them into process_file
=> Global block counter no longer needed, so remove that too
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Don't need that, we already know the index when we write add
the fragment.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This commit replaces the chdir to the input directory with pushd/popd
when building the fstree and again when packing files.
This simplifies handling of other file paths given on the command line
that have to be accessed and are relative to the original working
directories.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This commit changes the names of the tools to gensquashfs and rdsquashfs
so they don't collide with the names used by the squashfs-tools package
and the two can be installed side by side.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Pass in an external destination buffer + size and allow for propper
bounds checking (especially when unpacking).
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|