summaryrefslogtreecommitdiff
path: root/tar/sqfs2tar.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-20 17:48:33 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-20 18:34:17 +0200
commitec4332f747425859f37641ecd249537efb338a90 (patch)
tree9a5765fc0a9c2322c3aaf5718cdec9a653896e3d /tar/sqfs2tar.c
parentec70d9ffa6913c6643d25f9115830fd89b6ddfa7 (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar/sqfs2tar.c')
-rw-r--r--tar/sqfs2tar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c
index 43df40b..c624934 100644
--- a/tar/sqfs2tar.c
+++ b/tar/sqfs2tar.c
@@ -317,7 +317,8 @@ static int write_tree_dfs(const sqfs_tree_node_t *n)
return -1;
if (S_ISREG(sb.st_mode)) {
- if (data_reader_dump(data, n->inode, STDOUT_FILENO, false))
+ if (data_reader_dump(data, n->inode, STDOUT_FILENO,
+ super.block_size, false))
return -1;
if (padd_file(STDOUT_FILENO, sb.st_size, 512))