summaryrefslogtreecommitdiff
path: root/include/highlevel.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-04 18:02:44 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-04 18:02:44 +0200
commit407a2baae5622b05f1e9c4137448a973fd648736 (patch)
tree475a668f763dfc83f08c7df7d811c7e141759bb9 /include/highlevel.h
parentf780c9542d2c96cb0ae00a8de8d67b9a8fd278cd (diff)
Split fstree inode serialization, move independend part to libsquashfs.so
This commit adds a function to libsquashfs.so for writing generic inodes to a meta writer and another function to libsqfshelper.a that turns a tree node to an inode. That way, the tree serialization code can be expressed in terms of those functions and a bulk of the independend code can be moved over to libsquashfs.so Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/highlevel.h')
-rw-r--r--include/highlevel.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/highlevel.h b/include/highlevel.h
index 576f686..379430d 100644
--- a/include/highlevel.h
+++ b/include/highlevel.h
@@ -103,20 +103,6 @@ int sqfs_reader_open(sqfs_reader_t *rd, const char *filename,
/* Cleanup after a successfull sqfs_reader_open */
void sqfs_reader_close(sqfs_reader_t *rd);
-/*
- High level helper function to serialize a tree_node_t to a squashfs inode
- and write it to a meta data writer.
-
- The inode is written to `im`. If it is a directory node, the directory
- contents are written to `dm` using meta_writer_write_dir. The given
- id_table_t is used to store the uid and gid on the fly and write the
- coresponding indices to the inode structure.
-
- Returns 0 on success. Prints error messages to stderr on failure.
- */
-int meta_writer_write_inode(fstree_t *fs, id_table_t *idtbl, meta_writer_t *im,
- sqfs_dir_writer_t *dirw, tree_node_t *node);
-
void compressor_print_available(void);
E_SQFS_COMPRESSOR compressor_get_default(void);
@@ -129,4 +115,8 @@ void compressor_print_help(E_SQFS_COMPRESSOR id);
int xattr_reader_restore_node(xattr_reader_t *xr, fstree_t *fs,
tree_node_t *node, uint32_t xattr);
+sqfs_inode_generic_t *tree_node_to_inode(fstree_t *fs, id_table_t *idtbl,
+ tree_node_t *node,
+ size_t *file_num_blocks);
+
#endif /* HIGHLEVEL_H */