summaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-15 14:44:44 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-15 14:47:03 +0200
commit14a925f6da442ecade7df75eb46a6edb9a1499af (patch)
treed63d56ec17e1d8bcbf310273f199f4891718a6b5 /tar
parent1b35319762cd83982dacbe96eccf07fd00d7858a (diff)
Add flags to data writer to micro manage behaviour
The added flags allow controlling the following on a per file level: - forcing a file to be written uncompressed - forcing a file to not have a fragment, i.e. the last truncated block actually being written as a block - padding a file to be alligned to device block size The flags are not yet exposed to anything user controllable (such as command line flags). Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r--tar/tar2sqfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c
index 1b7d3aa..3417fd0 100644
--- a/tar/tar2sqfs.c
+++ b/tar/tar2sqfs.c
@@ -185,14 +185,14 @@ static int write_file(tar_header_decoded_t *hdr, file_info_t *fi,
if (hdr->sparse != NULL) {
ret = write_data_from_fd_condensed(data, fi, STDIN_FILENO,
- hdr->sparse);
+ hdr->sparse, 0);
if (ret)
return -1;
return skip_padding(STDIN_FILENO, hdr->record_size);
}
- if (write_data_from_fd(data, fi, STDIN_FILENO))
+ if (write_data_from_fd(data, fi, STDIN_FILENO, 0))
return -1;
return skip_padding(STDIN_FILENO, fi->size);
@@ -361,7 +361,7 @@ int main(int argc, char **argv)
super.bytes_used += ret;
}
- data = data_writer_create(&super, cmp, outfd);
+ data = data_writer_create(&super, cmp, outfd, devblksize);
if (data == NULL)
goto out_cmp;