aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/data_writer/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/data_writer/serial.c')
-rw-r--r--lib/sqfs/data_writer/serial.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/sqfs/data_writer/serial.c b/lib/sqfs/data_writer/serial.c
index 38dcc58..916f497 100644
--- a/lib/sqfs/data_writer/serial.c
+++ b/lib/sqfs/data_writer/serial.c
@@ -35,7 +35,15 @@ void sqfs_data_writer_destroy(sqfs_data_writer_t *proc)
data_writer_cleanup(proc);
}
-int sqfs_data_writer_enqueue(sqfs_data_writer_t *proc, sqfs_block_t *block)
+int test_and_set_status(sqfs_data_writer_t *proc, int status)
+{
+ if (proc->status == 0)
+ proc->status = status;
+
+ return proc->status;
+}
+
+int data_writer_enqueue(sqfs_data_writer_t *proc, sqfs_block_t *block)
{
sqfs_block_t *fragblk = NULL;
@@ -44,12 +52,6 @@ int sqfs_data_writer_enqueue(sqfs_data_writer_t *proc, sqfs_block_t *block)
return proc->status;
}
- if (block->flags & ~SQFS_BLK_USER_SETTABLE_FLAGS) {
- proc->status = SQFS_ERROR_UNSUPPORTED;
- free(block);
- return proc->status;
- }
-
if (block->flags & SQFS_BLK_IS_FRAGMENT) {
block->checksum = crc32(0, block->data, block->size);