aboutsummaryrefslogtreecommitdiff
path: root/lib/common
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-12 18:32:12 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-15 13:38:25 +0200
commiteb9a4b9034453ae3093d678a6f3898303dc5a5a0 (patch)
treecd024b5ff5e1c77400a561adee50522f10fdadcd /lib/common
parent63bc750fecb00fc5878ca889204fc65510893778 (diff)
libio: remove ostream_append_sparse and fallback implementation
Instead of a separate append-sparse function, simply accept NULL as an input for append. For both Unix and Win32, a fallback needs to be implemented. For XFRM, we can just memset the input buffer to zero, same for the libsquashfs data writer. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/common')
-rw-r--r--lib/common/src/data_reader_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/common/src/data_reader_dump.c b/lib/common/src/data_reader_dump.c
index 29043f8..8f38bd2 100644
--- a/lib/common/src/data_reader_dump.c
+++ b/lib/common/src/data_reader_dump.c
@@ -26,7 +26,7 @@ int sqfs_data_reader_dump(const char *name, sqfs_data_reader_t *data,
diff = (filesz < block_size) ? filesz : block_size;
if (SQFS_IS_SPARSE_BLOCK(inode->extra[i])) {
- if (ostream_append_sparse(fp, diff))
+ if (fp->append(fp, NULL, diff))
return -1;
} else {
err = sqfs_data_reader_get_block(data, inode, i,