summaryrefslogtreecommitdiff
path: root/include/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'include/sqfs')
-rw-r--r--include/sqfs/dir.h4
-rw-r--r--include/sqfs/inode.h3
-rw-r--r--include/sqfs/meta_writer.h27
3 files changed, 19 insertions, 15 deletions
diff --git a/include/sqfs/dir.h b/include/sqfs/dir.h
index 818ca87..22f8a57 100644
--- a/include/sqfs/dir.h
+++ b/include/sqfs/dir.h
@@ -50,7 +50,7 @@ int meta_reader_read_dir_header(meta_reader_t *m, sqfs_dir_header_t *hdr);
The function internally prints to stderr on failure */
sqfs_dir_entry_t *meta_reader_read_dir_ent(meta_reader_t *m);
-sqfs_dir_writer_t *sqfs_dir_writer_create(meta_writer_t *dm);
+sqfs_dir_writer_t *sqfs_dir_writer_create(sqfs_meta_writer_t *dm);
void sqfs_dir_writer_destroy(sqfs_dir_writer_t *writer);
@@ -69,7 +69,7 @@ uint64_t sqfs_dir_writer_get_dir_reference(sqfs_dir_writer_t *writer);
size_t sqfs_dir_writer_get_index_size(sqfs_dir_writer_t *writer);
int sqfs_dir_writer_write_index(sqfs_dir_writer_t *writer,
- meta_writer_t *im);
+ sqfs_meta_writer_t *im);
#ifdef __cplusplus
}
diff --git a/include/sqfs/inode.h b/include/sqfs/inode.h
index c72f3c2..20c8fa2 100644
--- a/include/sqfs/inode.h
+++ b/include/sqfs/inode.h
@@ -143,7 +143,8 @@ sqfs_inode_generic_t *meta_reader_read_inode(meta_reader_t *ir,
uint64_t block_start,
size_t offset);
-int meta_writer_write_inode(meta_writer_t *ir, sqfs_inode_generic_t *n);
+int sqfs_meta_writer_write_inode(sqfs_meta_writer_t *iw,
+ sqfs_inode_generic_t *n);
#ifdef __cplusplus
}
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 */