From ec4332f747425859f37641ecd249537efb338a90 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 20 Sep 2019 17:48:33 +0200 Subject: Move data_reader_dump function out of data reader This commit adds two new functions for getting a file block by index, or a files fragment. The data_reader_dump function is rewritten in terms of those two functions and moved to a seperate file. Signed-off-by: David Oberhollenzer --- unpack/rdsquashfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'unpack/rdsquashfs.c') diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c index 60bfd19..e8ec3ec 100644 --- a/unpack/rdsquashfs.c +++ b/unpack/rdsquashfs.c @@ -102,7 +102,8 @@ int main(int argc, char **argv) goto out; } - if (data_reader_dump(data, n->inode, STDOUT_FILENO, false)) + if (data_reader_dump(data, n->inode, STDOUT_FILENO, + super.block_size, false)) goto out; break; case OP_UNPACK: -- cgit v1.2.3