summaryrefslogtreecommitdiff
path: root/unpack
AgeCommit message (Collapse)Author
2019-06-11Move file extraction code to generic data_reader_t in libsquashfs.aDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-11cleanup: simplify rdsquashfs unpacking: use existing utility functionsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-10cleanup: move tree deserialization to libsqfs.aDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-21Add command line flag for compressor options, pass them to compressorsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-20cleanup: remove squashfs type from fstree nodesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-19Add ZSTD compressor implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-06Add lz4 compressor implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-06Implement reading and writing of compressor optionsDavid Oberhollenzer
- gensquashfs simply asks the backend compressor to write its options to the file and does accounting - rdsquasfs simply asks the backend compressor to transparentyl snort the options from the file - not implemented in any compressor backend yet Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-06Add LZO compressor implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-05rdsquashfs: reorder unpack flags, add flag to produce listingDavid Oberhollenzer
The listing command has been used successfully to do the following: - generate a prestine file system using gensquashfs - repeate multiple times: - generate a listing from the file system - unpack only the regular files from the file system - generate a new file system from the listing - run `diff` on the old and new filesystem and admire that they are identical - replace the old file system with the new one, since they are identical Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-05Print out what we are doing on the way and options to keep quietDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04rdsquashfs: malloc extraction buffers ahead of timeDavid Oberhollenzer
Instead of malloc/freeing the buffers for every file, allocate them once, ahead of time. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04rdsquashfs: more cleanupDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04cleanup: rdsquashfs: store global data in structureDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04rdsquashfs: add ability to unpack only a sub tree of the file systemDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04Rename tools to not collide with squashfs-toolsDavid Oberhollenzer
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>
2019-05-04Rename lzma compressor to xz, zlib compressor to gzipDavid Oberhollenzer
Stick to the terminology that SquashFS uses. SquashFS uses "lzma" to refere to lzma1, "xz" to refere to lzma2 and confusingly "gzip" to refere to raw zlib deflate. We can avoid a lot of confusion by _consistently_ using the same terminology. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-04Remove compressor internal buffersDavid Oberhollenzer
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>
2019-05-03unsquashfs: add flags to filter what file types to unpackDavid Oberhollenzer
This allows the user to skip stuff like device special files (which non-root can't create anyway) or to not create symlinks/fifos etc... Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-03unsquashfs: add code to unpack the entire file systemDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-03unsquashfs: print file size and symlink targetsDavid Oberhollenzer
Behave somewhat like `ls -l' does by printing the size of the entry (or major/minor device number for devices) between the UID/GID column and the name column. For symlinks, print and arrow and the symlink target after the name. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-03unsquashfs: add file data extractionDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-03unsquashfs: add argument processing, file listing parameterDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-03unsquashfs: restore fstree from imageDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-03unsquashfs: add function to turn inode into fs tree nodeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-02unsquashfs: read ID table from fileDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-02Add unsquashfs stubDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>