From cfe80ff9045f33375f11a285098fb15ce214372a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 16 Aug 2019 23:13:42 +0200 Subject: Minor interface change to data writer Signed-off-by: David Oberhollenzer --- lib/sqfs/data_writer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') 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); +} -- cgit v1.2.3