diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-05-27 15:40:05 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-05-30 17:49:40 +0200 |
commit | 4840d9b654f302ff5bb8aba2e04331374bf6c0ef (patch) | |
tree | 46caf8b80592d9ecdc26beeee1e1303389ca3d03 /bin/sqfs2tar/sqfs2tar.c | |
parent | 36e70b384e1360e47f473be54ef3c0599bf82844 (diff) |
sqfs2tar: Move hard link detection to tree-repacking code
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/sqfs2tar/sqfs2tar.c')
-rw-r--r-- | bin/sqfs2tar/sqfs2tar.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/bin/sqfs2tar/sqfs2tar.c b/bin/sqfs2tar/sqfs2tar.c index 305bd4b..aa2a5b7 100644 --- a/bin/sqfs2tar/sqfs2tar.c +++ b/bin/sqfs2tar/sqfs2tar.c @@ -9,7 +9,6 @@ sqfs_xattr_reader_t *xr; sqfs_data_reader_t *data; sqfs_super_t super; -sqfs_hard_link_t *links = NULL; FILE *out_file = NULL; static sqfs_file_t *file; @@ -115,7 +114,6 @@ int main(int argc, char **argv) sqfs_compressor_t *cmp; sqfs_id_table_t *idtbl; sqfs_dir_reader_t *dr; - sqfs_hard_link_t *lnk; size_t i; process_args(argc, argv); @@ -240,18 +238,7 @@ int main(int argc, char **argv) } } - if (!no_links) { - if (sqfs_tree_find_hard_links(root, &links)) - goto out_tree; - - for (lnk = links; lnk != NULL; lnk = lnk->next) { - lnk->target = assemble_tar_path(lnk->target, false); - if (lnk->target == NULL) - goto out; - } - } - - if (write_tree_dfs(root)) + if (write_tree(root)) goto out; if (terminate_archive()) @@ -260,13 +247,6 @@ int main(int argc, char **argv) status = EXIT_SUCCESS; fflush(out_file); out: - while (links != NULL) { - lnk = links; - links = links->next; - free(lnk->target); - free(lnk); - } -out_tree: if (root != NULL) sqfs_dir_tree_destroy(root); out_xr: |