aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 19:16:11 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 19:16:11 +0200
commitf49fe3bbf0d52e2afcc1ace8c1f48dee9349d4f8 (patch)
tree41e55971f8f1052c0457332dbf5718f7b7a9c661 /include
parent798abd9eaf3c9e8aa83c4dca28cdd44890253efe (diff)
Cleanup sqfs_write_table
This commit attempts to make the generic table writer more readable. A few changes are made, including heap allocation of the block list. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/highlevel.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/highlevel.h b/include/highlevel.h
index 23f5b68..16db1cf 100644
--- a/include/highlevel.h
+++ b/include/highlevel.h
@@ -23,17 +23,16 @@ enum RDTREE_FLAGS {
/*
Convenience function for writing meta data to a SquashFS image
- 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 an uncompressed address list and returns the location where
- the address list starts.
+ This function internally creates a meta data writer and writes the given
+ 'data' blob with 'table_size' bytes to disk, neatly partitioned into meta
+ data blocks. For each meta data block, it remembers the 64 bit start address,
+ writes out all addresses to an uncompressed list and returns the location
+ where the address list starts in 'start'.
Returns 0 on success. Internally prints error messages to stderr.
*/
-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);
+int sqfs_write_table(int outfd, sqfs_super_t *super, compressor_t *cmp,
+ const void *data, size_t table_size, uint64_t *start);
/*
High level helper function to serialize an entire file system tree to