aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/src/io
AgeCommit message (Collapse)Author
2023-10-11libsqfs: Rework the buffer advance logic for sqfs_istream_tDavid Oberhollenzer
Remove the asserts. If we eat more data than present, reset the offset and count to zero. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-09-19libsqfs: Make sure directory iterators always set the size for linksDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-09-08Add a hard link detecting/filtering directory iteratorDavid Oberhollenzer
The reason this is implemented separately, instead of roling it into the recursive iterator, is so that we can do additional filtering in between. For instance, we can rewrite the path and the hard link path will match up, or if we remove nodes from the hierarchy, we won't end up with a hard link pointing outside. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-09-08libsqfs: bring sqfs_file_t in line with stream APIDavid Oberhollenzer
Rename the open function to sqfs_file_open, use an argument for the return pointer and pass back and error number on failure. Also add an inermediate function to open an sqfs_file_t using a handle, similar to the stream API. The get_file_size function is moved to the native wrappers and some of the implementation is cleaned up a little. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-08-18Add an inode fieled to sqfs_dir_entry_tDavid Oberhollenzer
This might be needed externally for things like hard link detection. For the unix implementation, store the actual inode number here. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-08-10Split recursive directory iteratorDavid Oberhollenzer
The recursive part and the filter part are split up, the recursive iterator wrapper is moved into libsquashfs and the libio iterator is modified to use that internally instead of implementig the recursion step. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-08-10Move dir_iterator_t from libio into libsquashfsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-18Fix type flag decoding in win32 seek functionDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-18libsqfs: consistently rename the native file handle functionsDavid Oberhollenzer
Start with a common prefix "sqfs_native_file_*" Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-16Cleanup: libsqfs: move the generic stream API to the rest of the I/O codeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2023-06-16libsquashfs: merge windows & unix file I/O primitivesDavid Oberhollenzer
By adding additional close/duplicate primitives, the remaining, mostly identical istream/ostream/file code is mostly identical between Windows and Unix and be merged, mostly without stitches. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>