summaryrefslogtreecommitdiff
path: root/mkfs/mkfs.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-01 23:08:04 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-01 23:08:36 +0200
commit9d9d4505f58b6584fe3b261a7686c5d779f77c11 (patch)
tree7f1a086abc273c55c4d3a9cf96144715e3d15329 /mkfs/mkfs.c
parent307107ecd2fc3ffbf6fe91497daf767700f3572f (diff)
Internalize the layout of the id_table_t structure
As an opaque struct it has a chance to change its layout in the future without breaking ABI compatibiliy. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mkfs.c')
-rw-r--r--mkfs/mkfs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 512b30b..75d4cd8 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
data_writer_t *data;
sqfs_super_t super;
compressor_t *cmp;
- id_table_t idtbl;
+ id_table_t *idtbl;
options_t opt;
fstree_t fs;
int outfd;
@@ -117,7 +117,8 @@ int main(int argc, char **argv)
goto out_fstree;
}
- if (id_table_init(&idtbl))
+ idtbl = id_table_create();
+ if (idtbl == NULL)
goto out_fstree;
outfd = open(opt.outfile, opt.outmode, 0644);
@@ -173,7 +174,7 @@ int main(int argc, char **argv)
if (pack_files(data, &fs, &opt))
goto out_data;
- if (sqfs_serialize_fstree(outfd, &super, &fs, cmp, &idtbl))
+ if (sqfs_serialize_fstree(outfd, &super, &fs, cmp, idtbl))
goto out_data;
if (data_writer_write_fragment_table(data))
@@ -184,7 +185,7 @@ int main(int argc, char **argv)
goto out_data;
}
- if (id_table_write(&idtbl, outfd, &super, cmp))
+ if (id_table_write(idtbl, outfd, &super, cmp))
goto out_data;
if (write_xattr(outfd, &fs, &super, cmp))
@@ -209,7 +210,7 @@ out_cmp:
out_outfd:
close(outfd);
out_idtbl:
- id_table_cleanup(&idtbl);
+ id_table_destroy(idtbl);
out_fstree:
fstree_cleanup(&fs);
return status;