aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfshelper
AgeCommit message (Collapse)Author
2019-09-09Remove ad-hoc image size accountingDavid Oberhollenzer
Much simpler to just set the correct size in the end, before writing the super block. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-09Move file name sanity check to deserialize_fstreeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-08Replace direct file I/O with abstraction layerDavid Oberhollenzer
This should make it easier to use libsquashfs with custom setups that embedd a squashfs image inside something else. Also, it should make it easier to port to non unix-like platforms. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-07Remove printing to stderr in libsquashfs with returning error numbersDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Cleanup naming scheme of compressorDavid Oberhollenzer
Add sqfs_* prefix to compressor, move implementation prefix up front. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Cleanup: add SQFS_*/sqfs_* prefix to block processorDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Cleanup: add sqfs_* prefix to id tableDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Cleanup: add sqfs_* prefix to meta readerDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Cleanup: add sqfs_* prefix to meta writerDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Cleanup: unify sqfs/SQFS name prefix for xattr readerDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Minor cleanup: remove if (...) goto skip construct from data readerDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-05Cleanup: move "create_block" from block processor over to data writerDavid Oberhollenzer
It only has one user and is quite specialized actually. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-04Store number of file blocks in generic inode structDavid Oberhollenzer
This simplifies things a little bit. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-04Split fstree inode serialization, move independend part to libsquashfs.soDavid Oberhollenzer
This commit adds a function to libsquashfs.so for writing generic inodes to a meta writer and another function to libsqfshelper.a that turns a tree node to an inode. That way, the tree serialization code can be expressed in terms of those functions and a bulk of the independend code can be moved over to libsquashfs.so Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-04Add fstree independend directory writer to libsquashfs.soDavid Oberhollenzer
This commit adds a directory writer to libsquashfs that wrapps a meta data writer and provides a higher-level interface for writing directory entries. Under the hood it enforces the rules that squashfs insists upon. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-02Move fstree independend parts of xattr_reader to libsquashfs.soDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-01Internalize the layout of the id_table_t structureDavid Oberhollenzer
As an opaque struct it has a chance to change its layout in the future without breaking ABI compatibiliy. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-01Move command line processing stuff out of compressor codeDavid Oberhollenzer
This commit moves stuff like printing help text, command line option processing and enumerating available processors on stdout out of the generic compressor code. The option string is replaced with a structure that directly exposese the tweakable parameters for all compressors. A function for parsing the command line arguments into this structure is added in sqfshelper. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-01API cleanup: Shuffle declarations aroundDavid Oberhollenzer
Move declarations for stuff that is defined in libsquashfs.so into the public headers and declarations for stuff that isn't, out of there. Also move the meta reader/writer helper functions to their respective headers. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-01Break up squashfs.h into topic related headersDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-01Install libsquashfs.so headers on the system in "sqfs" subdirectoryDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-09-01Move some application specific stuff out of libutilDavid Oberhollenzer
This commit does the following: - canonicalize_name is moved to libfstree - source_date_epoch is only used inside libfstree, so it's also moved over and can later be completely internalized - print_version is moved over to sqfshelper. Mainly so it doesn't end up in libsquashfs.so for no sane reason. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-08-31Split libsquashfs.a into low seperate librariesDavid Oberhollenzer
The idea is to make libsquashfs.a independend of libfstree.a, so it becomes a general purpose squashfs manipulation library. All the high level glue code for libfstree.a and utilites that are overly specific with to tools are moved to a seperate librarby. This commit makes the first step by moving the stuff with dependencies on libfstree to a seperate library. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>