diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-26 18:55:04 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-26 18:55:04 +0200 |
commit | 9ed84dac57944149e05646960a715d8f98dabcc5 (patch) | |
tree | 1be14b86b10b96d0549b1839078c0c19c588f77e /include/sqfs | |
parent | ff4a9235feb4237854ff102c4dc7cf4645d6a116 (diff) |
Replace the data writer enqueue with "append buffer to current file"
This commit turns the file interface into an actual, generic file
interface and does away with having to move around blocks outside
the data writer. Instead the data writer takes over full control
and responsibility of dividing the input data up into blocks
propperly.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs')
-rw-r--r-- | include/sqfs/data_writer.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/include/sqfs/data_writer.h b/include/sqfs/data_writer.h index ffa3334..37d5479 100644 --- a/include/sqfs/data_writer.h +++ b/include/sqfs/data_writer.h @@ -173,23 +173,8 @@ SQFS_API int sqfs_data_writer_begin_file(sqfs_data_writer_t *proc, sqfs_inode_generic_t *inode, uint32_t flags); -/** - * @brief Add a block to be processed. - * - * @memberof sqfs_data_writer_t - * - * The function takes over ownership of the submitted block. It is freed after - * processing is done and it is written to disk. - * - * @param proc A pointer to a data writer object. - * @param block A pointer to a block to enqueue. - * - * @return Zero on success, an @ref E_SQFS_ERROR value on failure. Depending on - * the implementation used, the failure could have been caused by - * processing of a block that was submitted earlier. - */ -SQFS_API int sqfs_data_writer_enqueue(sqfs_data_writer_t *proc, - sqfs_block_t *block); +SQFS_API int sqfs_data_writer_append(sqfs_data_writer_t *proc, + const void *data, size_t size); SQFS_API int sqfs_data_writer_end_file(sqfs_data_writer_t *proc); |