aboutsummaryrefslogtreecommitdiff
path: root/lib/common/src/writer
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-04-02 17:22:24 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-04-02 17:22:24 +0200
commit9940efe053263478c5f29367b11d6f7ed1276aa4 (patch)
tree99d1c9e9712c73ba4e6e8e145f007cb74294f12a /lib/common/src/writer
parent32eb57dd9a19254565a0792ab9b627a3dac319f9 (diff)
Move fstree CLI code to libcommon
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/common/src/writer')
-rw-r--r--lib/common/src/writer/init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/common/src/writer/init.c b/lib/common/src/writer/init.c
index fe5fcc5..60d7a12 100644
--- a/lib/common/src/writer/init.c
+++ b/lib/common/src/writer/init.c
@@ -46,6 +46,7 @@ int sqfs_writer_init(sqfs_writer_t *sqfs, const sqfs_writer_cfg_t *wrcfg)
{
sqfs_block_processor_desc_t blkdesc;
sqfs_compressor_config_t cfg;
+ fstree_defaults_t fsd;
int ret, flags;
sqfs->filename = wrcfg->filename;
@@ -62,7 +63,10 @@ int sqfs_writer_init(sqfs_writer_t *sqfs, const sqfs_writer_cfg_t *wrcfg)
return -1;
}
- if (fstree_init(&sqfs->fs, wrcfg->fs_defaults))
+ if (parse_fstree_defaults(&fsd, wrcfg->fs_defaults))
+ goto fail_file;
+
+ if (fstree_init(&sqfs->fs, &fsd))
goto fail_file;
ret = sqfs_compressor_create(&cfg, &sqfs->cmp);
@@ -99,7 +103,7 @@ int sqfs_writer_init(sqfs_writer_t *sqfs, const sqfs_writer_cfg_t *wrcfg)
}
ret = sqfs_super_init(&sqfs->super, wrcfg->block_size,
- sqfs->fs.defaults.st_mtime, wrcfg->comp_id);
+ sqfs->fs.defaults.mtime, wrcfg->comp_id);
if (ret) {
sqfs_perror(wrcfg->filename, "initializing super block", ret);
goto fail_uncmp;