aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfshelper
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 17:37:19 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 17:37:19 +0200
commitf85394c5887350a9728e108e72d908e08fc4cb78 (patch)
tree76ee4e50a5ece365d1c429271bd735dca40f01ad /lib/sqfshelper
parenta4b4c27bb01e64ff0072be78f7ddc0fa64193bfa (diff)
Cleanup: add sqfs_* prefix to id table
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfshelper')
-rw-r--r--lib/sqfshelper/deserialize_fstree.c11
-rw-r--r--lib/sqfshelper/serialize_fstree.c2
-rw-r--r--lib/sqfshelper/tree_node_from_inode.c6
-rw-r--r--lib/sqfshelper/tree_node_to_inode.c6
4 files changed, 13 insertions, 12 deletions
diff --git a/lib/sqfshelper/deserialize_fstree.c b/lib/sqfshelper/deserialize_fstree.c
index 71cc57e..8d3c916 100644
--- a/lib/sqfshelper/deserialize_fstree.c
+++ b/lib/sqfshelper/deserialize_fstree.c
@@ -79,7 +79,8 @@ static bool node_would_be_own_parent(tree_node_t *root, tree_node_t *n)
}
static int fill_dir(sqfs_meta_reader_t *ir, sqfs_meta_reader_t *dr,
- tree_node_t *root, sqfs_super_t *super, id_table_t *idtbl,
+ tree_node_t *root, sqfs_super_t *super,
+ sqfs_id_table_t *idtbl,
fstree_t *fs, sqfs_xattr_reader_t *xr, int flags)
{
sqfs_inode_generic_t *inode;
@@ -208,7 +209,7 @@ int deserialize_fstree(fstree_t *out, sqfs_super_t *super, compressor_t *cmp,
sqfs_meta_reader_t *ir, *dr;
sqfs_inode_generic_t *root;
sqfs_xattr_reader_t *xr;
- id_table_t *idtbl;
+ sqfs_id_table_t *idtbl;
int status = -1;
size_t offset;
@@ -228,11 +229,11 @@ int deserialize_fstree(fstree_t *out, sqfs_super_t *super, compressor_t *cmp,
if (dr == NULL)
goto out_ir;
- idtbl = id_table_create();
+ idtbl = sqfs_id_table_create();
if (idtbl == NULL)
goto out_dr;
- if (id_table_read(idtbl, fd, super, cmp))
+ if (sqfs_id_table_read(idtbl, fd, super, cmp))
goto out_id;
xr = sqfs_xattr_reader_create(fd, super, cmp);
@@ -297,7 +298,7 @@ int deserialize_fstree(fstree_t *out, sqfs_super_t *super, compressor_t *cmp,
out_xr:
sqfs_xattr_reader_destroy(xr);
out_id:
- id_table_destroy(idtbl);
+ sqfs_id_table_destroy(idtbl);
out_dr:
sqfs_meta_reader_destroy(dr);
out_ir:
diff --git a/lib/sqfshelper/serialize_fstree.c b/lib/sqfshelper/serialize_fstree.c
index 0a574a0..f400a53 100644
--- a/lib/sqfshelper/serialize_fstree.c
+++ b/lib/sqfshelper/serialize_fstree.c
@@ -42,7 +42,7 @@ static int write_dir_entries(sqfs_dir_writer_t *dirw, tree_node_t *node)
}
int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
- compressor_t *cmp, id_table_t *idtbl)
+ compressor_t *cmp, sqfs_id_table_t *idtbl)
{
sqfs_inode_generic_t *inode;
sqfs_meta_writer_t *im, *dm;
diff --git a/lib/sqfshelper/tree_node_from_inode.c b/lib/sqfshelper/tree_node_from_inode.c
index d8b3361..68365d0 100644
--- a/lib/sqfshelper/tree_node_from_inode.c
+++ b/lib/sqfshelper/tree_node_from_inode.c
@@ -58,7 +58,7 @@ static void copy_block_sizes(sqfs_inode_generic_t *inode, tree_node_t *out,
}
tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode,
- const id_table_t *idtbl,
+ const sqfs_id_table_t *idtbl,
const char *name,
size_t block_size)
{
@@ -70,12 +70,12 @@ tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode,
return NULL;
}
- if (id_table_index_to_id(idtbl, inode->base.uid_idx, &out->uid)) {
+ if (sqfs_id_table_index_to_id(idtbl, inode->base.uid_idx, &out->uid)) {
free(out);
return NULL;
}
- if (id_table_index_to_id(idtbl, inode->base.gid_idx, &out->gid)) {
+ if (sqfs_id_table_index_to_id(idtbl, inode->base.gid_idx, &out->gid)) {
free(out);
return NULL;
}
diff --git a/lib/sqfshelper/tree_node_to_inode.c b/lib/sqfshelper/tree_node_to_inode.c
index d3346e2..7de8abd 100644
--- a/lib/sqfshelper/tree_node_to_inode.c
+++ b/lib/sqfshelper/tree_node_to_inode.c
@@ -81,7 +81,7 @@ static int get_type(tree_node_t *node)
assert(0);
}
-sqfs_inode_generic_t *tree_node_to_inode(fstree_t *fs, id_table_t *idtbl,
+sqfs_inode_generic_t *tree_node_to_inode(fstree_t *fs, sqfs_id_table_t *idtbl,
tree_node_t *node)
{
size_t i, extra = 0, block_count = 0;
@@ -124,10 +124,10 @@ sqfs_inode_generic_t *tree_node_to_inode(fstree_t *fs, id_table_t *idtbl,
}
}
- if (id_table_id_to_index(idtbl, node->uid, &uid_idx))
+ if (sqfs_id_table_id_to_index(idtbl, node->uid, &uid_idx))
goto fail;
- if (id_table_id_to_index(idtbl, node->gid, &gid_idx))
+ if (sqfs_id_table_id_to_index(idtbl, node->gid, &gid_idx))
goto fail;
if (node->xattr != NULL)