summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/mkfs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index d708d37..ae6210b 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -39,7 +39,7 @@ static int padd_file(sqfs_info_t *info)
int main(int argc, char **argv)
{
- int status = EXIT_FAILURE;
+ int status = EXIT_FAILURE, ret;
sqfs_info_t info;
memset(&info, 0, sizeof(info));
@@ -81,6 +81,15 @@ int main(int argc, char **argv)
goto out_outfd;
}
+ ret = info.cmp->write_options(info.cmp, info.outfd);
+ if (ret < 0)
+ goto out_cmp;
+
+ if (ret > 0) {
+ info.super.flags |= SQFS_FLAG_COMPRESSOR_OPTIONS;
+ info.super.bytes_used += ret;
+ }
+
if (write_data_to_image(&info))
goto out_cmp;