diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-11 12:56:22 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-11 13:00:25 +0200 |
commit | 99b153177dbac8689b2e58fc29530727fa7e00fc (patch) | |
tree | f6e7c0fd060c51c7e25fe76138ceb5abfbe002a2 /mkfs/block.c | |
parent | 223dcc487cb0115d3ccb0dd6464d20346253a43e (diff) |
cleanup: remove rest of sqfs_info_t
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/block.c')
-rw-r--r-- | mkfs/block.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mkfs/block.c b/mkfs/block.c index 89bb689..73d43e8 100644 --- a/mkfs/block.c +++ b/mkfs/block.c @@ -52,33 +52,33 @@ static int find_and_process_files(data_writer_t *data, tree_node_t *n, return 0; } -int write_data_to_image(data_writer_t *data, sqfs_info_t *info) +int write_data_to_image(data_writer_t *data, fstree_t *fs, options_t *opt) { bool need_restore = false; const char *ptr; int ret; - if (info->opt.packdir != NULL) { - if (pushd(info->opt.packdir)) + if (opt->packdir != NULL) { + if (pushd(opt->packdir)) return -1; need_restore = true; } else { - ptr = strrchr(info->opt.infile, '/'); + ptr = strrchr(opt->infile, '/'); if (ptr != NULL) { - if (pushdn(info->opt.infile, ptr - info->opt.infile)) + if (pushdn(opt->infile, ptr - opt->infile)) return -1; need_restore = true; } } - ret = find_and_process_files(data, info->fs.root, info->opt.quiet); + ret = find_and_process_files(data, fs->root, opt->quiet); ret = ret == 0 ? data_writer_flush_fragments(data) : ret; if (need_restore) - ret = popd(); + ret = ret == 0 ? popd() : ret; return ret; } |