diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-01 01:41:30 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-02 12:40:06 +0200 |
commit | de9f0a79850df74078b8c104ce1232d40ec9cc1f (patch) | |
tree | 3a2dcd1592f0409379d14a38a416d0998189e560 /mkfs | |
parent | 2196bc61b8ba67c91927ba28538538b89ccf73f1 (diff) |
Add id table code stub
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs')
-rw-r--r-- | mkfs/mksquashfs.c | 7 | ||||
-rw-r--r-- | mkfs/mksquashfs.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mkfs/mksquashfs.c b/mkfs/mksquashfs.c index 7503978..3272dbc 100644 --- a/mkfs/mksquashfs.c +++ b/mkfs/mksquashfs.c @@ -84,10 +84,13 @@ int main(int argc, char **argv) return EXIT_FAILURE; } + if (id_table_init(&info.idtbl)) + return EXIT_FAILURE; + info.outfd = open(info.opt.outfile, info.opt.outmode, 0644); if (info.outfd < 0) { perror(info.opt.outfile); - return EXIT_FAILURE; + goto out_idtbl; } if (sqfs_super_write(&info.super, info.outfd)) @@ -129,5 +132,7 @@ out_fstree: fstree_cleanup(&info.fs); out_outfd: close(info.outfd); +out_idtbl: + id_table_cleanup(&info.idtbl); return status; } diff --git a/mkfs/mksquashfs.h b/mkfs/mksquashfs.h index 2e0183e..5522268 100644 --- a/mkfs/mksquashfs.h +++ b/mkfs/mksquashfs.h @@ -4,6 +4,7 @@ #include "squashfs.h" #include "compress.h" +#include "id_table.h" #include "fstree.h" #include "config.h" @@ -43,6 +44,8 @@ typedef struct { file_info_t *frag_list; size_t frag_offset; + id_table_t idtbl; + compressor_t *cmp; } sqfs_info_t; |