diff options
author | Colin Cross <ccross@android.com> | 2012-04-24 23:07:49 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2012-07-09 22:09:37 -0700 |
commit | b55dceea986ab24f8b836b5116b389ed619c816e (patch) | |
tree | aa4f4ed6384931ec362c70eca7b25a7cb8dab450 /libsparse/output_file.h | |
parent | 411619e921904b896eddae81c086c1f687c8304d (diff) | |
download | system_core-b55dceea986ab24f8b836b5116b389ed619c816e.tar.gz system_core-b55dceea986ab24f8b836b5116b389ed619c816e.tar.bz2 system_core-b55dceea986ab24f8b836b5116b389ed619c816e.zip |
libsparse: cleanups
Move block loops into sparse.c with iterator helpers in backed_block.c.
Simplify chunk writing by moving skip chunk calls from output_file.c to
sparse.c.
Rename variables to be consistent with new naming.
Remove use of u8, u32, u64.
Change-Id: Ic138ad58bef9f96239266ccee12ee83ea285e7eb
Diffstat (limited to 'libsparse/output_file.h')
-rw-r--r-- | libsparse/output_file.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libsparse/output_file.h b/libsparse/output_file.h index b12194fc7..cb2feb7fb 100644 --- a/libsparse/output_file.h +++ b/libsparse/output_file.h @@ -26,11 +26,12 @@ struct output_file *open_output_file(const char *filename, int gz, int sparse, int chunks, int crc); struct output_file *open_output_fd(int fd, unsigned int block_size, int64_t len, int gz, int sparse, int chunks, int crc); -void write_data_block(struct output_file *out, int64_t off, void *data, int len); -void write_fill_block(struct output_file *out, int64_t off, unsigned int fill_val, int len); -void write_data_file(struct output_file *out, int64_t off, const char *file, - int64_t offset, int len); -void pad_output_file(struct output_file *out, int64_t len); +int write_data_chunk(struct output_file *out, unsigned int len, void *data); +int write_fill_chunk(struct output_file *out, unsigned int len, + uint32_t fill_val); +int write_file_chunk(struct output_file *out, unsigned int len, + const char *file, int64_t offset); +int write_skip_chunk(struct output_file *out, int64_t len); void close_output_file(struct output_file *out); #endif |