summaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-16 23:13:42 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-18 22:44:39 +0200
commitcfe80ff9045f33375f11a285098fb15ce214372a (patch)
treecf70d1d5d29694392715c68c6d7b994d2005d6ea /lib/sqfs
parentb45850388ea5505f4fd50cd659abe2f02aeca0b5 (diff)
Minor interface change to data writer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/data_writer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqfs/data_writer.c b/lib/sqfs/data_writer.c
index ea650bd..d24f2d9 100644
--- a/lib/sqfs/data_writer.c
+++ b/lib/sqfs/data_writer.c
@@ -105,7 +105,7 @@ static int allign_file(data_writer_t *data)
return 0;
}
-int data_writer_flush_fragments(data_writer_t *data)
+static int flush_fragments(data_writer_t *data)
{
uint64_t offset;
uint32_t out;
@@ -193,7 +193,7 @@ static int flush_data_block(data_writer_t *data, size_t size, bool is_last,
}
if (data->frag_offset + size > data->super->block_size) {
- if (data_writer_flush_fragments(data))
+ if (flush_fragments(data))
return -1;
}
@@ -398,3 +398,8 @@ int data_writer_write_fragment_table(data_writer_t *data)
data->super->fragment_table_start = start;
return 0;
}
+
+int data_writer_sync(data_writer_t *data)
+{
+ return flush_fragments(data);
+}