summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/highlevel.h18
-rw-r--r--include/sqfs/inode.h4
2 files changed, 8 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 */
diff --git a/include/sqfs/inode.h b/include/sqfs/inode.h
index 6fb56b6..1f50b2a 100644
--- a/include/sqfs/inode.h
+++ b/include/sqfs/inode.h
@@ -10,6 +10,7 @@
#include "config.h"
#include "sqfs/meta_reader.h"
+#include "sqfs/meta_writer.h"
#include <stdint.h>
@@ -141,6 +142,9 @@ sqfs_inode_generic_t *meta_reader_read_inode(meta_reader_t *ir,
uint64_t block_start,
size_t offset);
+int meta_writer_write_inode(meta_writer_t *ir, sqfs_inode_generic_t *n,
+ size_t file_num_blocks);
+
#ifdef __cplusplus
}
#endif