diff options
Diffstat (limited to 'lib/sqfs')
-rw-r--r-- | lib/sqfs/data_writer.c | 9 |
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); +} |