aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfshelper/serialize_fstree.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 17:10:33 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 17:12:04 +0200
commitdd5d7adaa914982e8947bfe76fa3f195ed11cdb1 (patch)
tree541325774fa90814fbef1e9f9c5677c8330ef8c1 /lib/sqfshelper/serialize_fstree.c
parentd5f89c52d219332c48a46aa297bb4896e8c159aa (diff)
Cleanup: add sqfs_* prefix to meta writer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfshelper/serialize_fstree.c')
-rw-r--r--lib/sqfshelper/serialize_fstree.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/sqfshelper/serialize_fstree.c b/lib/sqfshelper/serialize_fstree.c
index 8e87354..0a574a0 100644
--- a/lib/sqfshelper/serialize_fstree.c
+++ b/lib/sqfshelper/serialize_fstree.c
@@ -45,18 +45,18 @@ int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
compressor_t *cmp, id_table_t *idtbl)
{
sqfs_inode_generic_t *inode;
+ sqfs_meta_writer_t *im, *dm;
sqfs_dir_writer_t *dirwr;
- meta_writer_t *im, *dm;
uint32_t offset;
uint64_t block;
int ret = -1;
size_t i;
- im = meta_writer_create(outfd, cmp, false);
+ im = sqfs_meta_writer_create(outfd, cmp, false);
if (im == NULL)
return -1;
- dm = meta_writer_create(outfd, cmp, true);
+ dm = sqfs_meta_writer_create(outfd, cmp, true);
if (dm == NULL)
goto out_im;
@@ -79,10 +79,10 @@ int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
sqfs_dir_writer_get_index_size(dirwr);
}
- meta_writer_get_position(im, &block, &offset);
+ sqfs_meta_writer_get_position(im, &block, &offset);
fs->inode_table[i]->inode_ref = (block << 16) | offset;
- if (meta_writer_write_inode(im, inode)) {
+ if (sqfs_meta_writer_write_inode(im, inode)) {
free(inode);
goto out;
}
@@ -97,31 +97,31 @@ int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
free(inode);
}
- if (meta_writer_flush(im))
+ if (sqfs_meta_writer_flush(im))
goto out;
- if (meta_writer_flush(dm))
+ if (sqfs_meta_writer_flush(dm))
goto out;
super->root_inode_ref = fs->root->inode_ref;
- meta_writer_get_position(im, &block, &offset);
+ sqfs_meta_writer_get_position(im, &block, &offset);
super->inode_table_start = super->bytes_used;
super->bytes_used += block;
- meta_writer_get_position(dm, &block, &offset);
+ sqfs_meta_writer_get_position(dm, &block, &offset);
super->directory_table_start = super->bytes_used;
super->bytes_used += block;
- if (meta_write_write_to_file(dm))
+ if (sqfs_meta_write_write_to_file(dm))
goto out;
ret = 0;
out:
sqfs_dir_writer_destroy(dirwr);
out_dm:
- meta_writer_destroy(dm);
+ sqfs_meta_writer_destroy(dm);
out_im:
- meta_writer_destroy(im);
+ sqfs_meta_writer_destroy(im);
return ret;
}