aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 13:01:17 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-28 15:07:34 +0200
commitd92e4dc101bcb6f807accff8c8ecad4030f41afb (patch)
treeb1a10fcac9280b1ff2bdfc75852bc597b67be2e1 /include
parent4e017928c7b5b590d2c7e04e42cb497eb3a4f8cf (diff)
Add support for unpacking sparse files as sparse files
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/data_reader.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/data_reader.h b/include/data_reader.h
index 68788b4..7de8e1a 100644
--- a/include/data_reader.h
+++ b/include/data_reader.h
@@ -26,8 +26,12 @@ void data_reader_destroy(data_reader_t *data);
file and its fragment, if it has one. The entire data is dumped to the
given file descriptor.
+ If allow_sparse is true, try to truncate and seek forward on outfd if a
+ zero block is found. If false, always write blocks of zeros to outfd.
+
Returns 0 on success, prints error messages to stderr on failure.
*/
-int data_reader_dump_file(data_reader_t *data, file_info_t *fi, int outfd);
+int data_reader_dump_file(data_reader_t *data, file_info_t *fi, int outfd,
+ bool allow_sparse);
#endif /* DATA_READER_H */