summaryrefslogtreecommitdiff
path: root/unpack/unsquashfs.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-02 08:46:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-03 21:45:46 +0200
commit03916fcbb453684fa13135e2b46f5a82d13d78a7 (patch)
treea0ef9caedfbbec98915b4675fccb8717ce58fd91 /unpack/unsquashfs.c
parent83183717feca5c673d614e341bfca49fae9a8001 (diff)
unsquashfs: restore fstree from image
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/unsquashfs.c')
-rw-r--r--unpack/unsquashfs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/unpack/unsquashfs.c b/unpack/unsquashfs.c
index 1493081..d332dee 100644
--- a/unpack/unsquashfs.c
+++ b/unpack/unsquashfs.c
@@ -8,7 +8,7 @@ int main(int argc, char **argv)
int fd, status = EXIT_FAILURE;
sqfs_super_t super;
compressor_t *cmp;
- id_table_t idtbl;
+ fstree_t fs;
if (argc != 2) {
fprintf(stderr, "Usage: %s <filename>\n", __progname);
@@ -51,15 +51,11 @@ int main(int argc, char **argv)
if (cmp == NULL)
goto out;
- if (id_table_init(&idtbl))
+ if (read_fstree(&fs, fd, &super, cmp))
goto out_cmp;
- if (id_table_read(&idtbl, fd, &super, cmp))
- goto out_idtbl;
-
status = EXIT_SUCCESS;
-out_idtbl:
- id_table_cleanup(&idtbl);
+ fstree_cleanup(&fs);
out_cmp:
cmp->destroy(cmp);
out: