From eb9a4b9034453ae3093d678a6f3898303dc5a5a0 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 12 Jun 2023 18:32:12 +0200 Subject: 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 --- lib/common/src/data_reader_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/common') 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, -- cgit v1.2.3