diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-05 21:45:04 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-05 21:45:04 +0200 |
commit | a5f604469d5cde8cb654e209f1ec30bf8e44b51e (patch) | |
tree | 58e41e92e9f25de67e21e40510eb3150dac31712 /include/table.h | |
parent | c7f38d808144e8f82805a6b84bfe48740af31b14 (diff) |
Comment on all the things
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/table.h')
-rw-r--r-- | include/table.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/table.h b/include/table.h index 3eb5655..ed2cb4a 100644 --- a/include/table.h +++ b/include/table.h @@ -8,6 +8,27 @@ #include <stdint.h> #include <stddef.h> +/** + * @brief Convenience function for writing meta data to a SquashFS image + * + * @note This function internally prints error message to stderr on failure + * + * This function internally creates a meta data writer and writes 'count' + * blocks of data from 'data' to it, each 'entsize' bytes in size. For each + * meta data block, it remembers the 64 bit start address, writes out all + * addresses to the and returns the location where the address list starts. + * For instance, the fragment table and ID table are stored in this format. + * + * @param outfd The file descriptor to write to + * @param super A pointer to the SquashFS super block + * @param data A pointer to the data to write out + * @param entsize The size of each data record + * @param count The number of data records to write out + * @param startblock Returns the location of the lookup table + * @param cmp A pointer to the compressor to use for the meta data writer + * + * @return Zero on success, -1 on failure + */ 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); |