summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/mkfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 05e8481..919ec20 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -161,10 +161,8 @@ int main(int argc, char **argv)
if (ret < 0)
goto out_cmp;
- if (ret > 0) {
+ if (ret > 0)
super.flags |= SQFS_FLAG_COMPRESSOR_OPTIONS;
- super.bytes_used += ret;
- }
data = data_writer_create(&super, cmp, outfile,
opt.devblksz, opt.num_jobs);
@@ -191,6 +189,8 @@ int main(int argc, char **argv)
if (write_xattr(outfile, &fs, &super, cmp))
goto out_data;
+ super.bytes_used = outfile->get_size(outfile);
+
if (sqfs_super_write(&super, outfile))
goto out_data;