summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-02-22 16:04:15 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-02-22 16:04:15 +0100
commit3d444455ee62eedc91b2eeeddb01d39ec0bcfecb (patch)
tree978309540b8156ccce838bc8715fd988136a58e6 /include
parenta807a45ffd64db60dc69012bef2538eaac3dac0b (diff)
Add a seperate sqfs_block_processor_sync function
This function waits for all pending blocks to be written to disk, but doesn't flush the fragment block, so processing can continue afterwards as if nothing happened. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/sqfs/block_processor.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sqfs/block_processor.h b/include/sqfs/block_processor.h
index cef4459..6945633 100644
--- a/include/sqfs/block_processor.h
+++ b/include/sqfs/block_processor.h
@@ -198,11 +198,28 @@ SQFS_API int sqfs_block_processor_append(sqfs_block_processor_t *proc,
SQFS_API int sqfs_block_processor_end_file(sqfs_block_processor_t *proc);
/**
+ * @brief Wait for the in-flight data blocks to finish.
+ *
+ * @memberof sqfs_block_processor_t
+ *
+ * @param proc A pointer to a block processor object.
+ *
+ * @return Zero on success, an @ref E_SQFS_ERROR value on failure. The failure
+ * return value can either be an error encountered during enqueueing,
+ * processing or writing to disk.
+ */
+SQFS_API int sqfs_block_processor_sync(sqfs_block_processor_t *proc);
+
+/**
* @brief Wait for the in-flight data blocks to finish and finally flush the
* current fragment block.
*
* @memberof sqfs_block_processor_t
*
+ * This does essentially the same as @ref sqfs_block_processor_sync, but after
+ * syncing, it also flushes the current fragment block, even if it isn't full
+ * yet and waits for it to be completed as well.
+ *
* @param proc A pointer to a block processor object.
*
* @return Zero on success, an @ref E_SQFS_ERROR value on failure. The failure