diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-10 22:10:46 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-06-10 22:10:58 +0200 |
commit | 69de75de97c17ef7370b26944ee286e4b3dc6266 (patch) | |
tree | 3f35ecefdb56aaae6fc806a099dba50777f01a3d /include/table.h | |
parent | 41fd1d4b9cd42eb28bf889719b8ce1a81af444b9 (diff) |
cleanup: move entire fstree serialization to libsqfs.a
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/table.h')
-rw-r--r-- | include/table.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/table.h b/include/table.h index 6d61c85..57d8654 100644 --- a/include/table.h +++ b/include/table.h @@ -4,6 +4,7 @@ #include "squashfs.h" #include "compress.h" +#include "fstree.h" #include <stdint.h> #include <stddef.h> @@ -23,4 +24,19 @@ int sqfs_write_table(int outfd, sqfs_super_t *super, const void *data, size_t entsize, size_t count, uint64_t *startblock, compressor_t *cmp); +/* + High level helper function to serialize an entire file system tree to + a squashfs inode table and directory table. + + The data is written to the given file descriptor and the super block is + update accordingly (inode and directory table start and total size). + + The function internally creates two meta data writers and uses + meta_writer_write_inode to serialize the inode table of the fstree. + + Returns 0 on success. Prints error messages to stderr on failure. + */ +int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs, + compressor_t *cmp, id_table_t *idtbl); + #endif /* TABLE_H */ |