diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-05 17:10:33 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-05 17:12:04 +0200 |
commit | dd5d7adaa914982e8947bfe76fa3f195ed11cdb1 (patch) | |
tree | 541325774fa90814fbef1e9f9c5677c8330ef8c1 /include/sqfs/meta_writer.h | |
parent | d5f89c52d219332c48a46aa297bb4896e8c159aa (diff) |
Cleanup: add sqfs_* prefix to meta writer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/meta_writer.h')
-rw-r--r-- | include/sqfs/meta_writer.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/sqfs/meta_writer.h b/include/sqfs/meta_writer.h index e91c1e9..a155f3e 100644 --- a/include/sqfs/meta_writer.h +++ b/include/sqfs/meta_writer.h @@ -4,8 +4,8 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ -#ifndef META_WRITER_H -#define META_WRITER_H +#ifndef SQFS_META_WRITER_H +#define SQFS_META_WRITER_H #include "config.h" @@ -13,7 +13,7 @@ #include "sqfs/id_table.h" #include "sqfs/data.h" -typedef struct meta_writer_t meta_writer_t; +typedef struct sqfs_meta_writer_t sqfs_meta_writer_t; #ifdef __cplusplus extern "C" { @@ -24,31 +24,34 @@ extern "C" { If keep_in_mem is true, the blocks are collected in memory and must be explicitly flushed to disk using meta_write_write_to_file. */ -meta_writer_t *meta_writer_create(int fd, compressor_t *cmp, bool keep_in_mem); +sqfs_meta_writer_t *sqfs_meta_writer_create(int fd, compressor_t *cmp, + bool keep_in_mem); -void meta_writer_destroy(meta_writer_t *m); +void sqfs_meta_writer_destroy(sqfs_meta_writer_t *m); /* Compress and flush the currently unfinished block to disk. Returns 0 on success, internally prints error message to stderr on failure */ -int meta_writer_flush(meta_writer_t *m); +int sqfs_meta_writer_flush(sqfs_meta_writer_t *m); /* Returns 0 on success. Prints error message to stderr on failure. */ -int meta_writer_append(meta_writer_t *m, const void *data, size_t size); +int sqfs_meta_writer_append(sqfs_meta_writer_t *m, const void *data, + size_t size); /* Query the current block start position and offset within the block */ -void meta_writer_get_position(const meta_writer_t *m, uint64_t *block_start, - uint32_t *offset); +void sqfs_meta_writer_get_position(const sqfs_meta_writer_t *m, + uint64_t *block_start, + uint32_t *offset); /* Reset all internal state, including the current block start position. */ -void meta_writer_reset(meta_writer_t *m); +void sqfs_meta_writer_reset(sqfs_meta_writer_t *m); /* If created with keep_in_mem true, write the collected blocks to disk. Does not flush the current block. Writes error messages to stderr and returns non-zero on failure. */ -int meta_write_write_to_file(meta_writer_t *m); +int sqfs_meta_write_write_to_file(sqfs_meta_writer_t *m); #ifdef __cplusplus } #endif -#endif /* META_WRITER_H */ +#endif /* SQFS_META_WRITER_H */ |