aboutsummaryrefslogtreecommitdiff
path: root/include/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'include/sqfs')
-rw-r--r--include/sqfs/dir.h9
-rw-r--r--include/sqfs/id_table.h3
-rw-r--r--include/sqfs/io.h2
-rw-r--r--include/sqfs/meta_reader.h5
-rw-r--r--include/sqfs/meta_writer.h2
-rw-r--r--include/sqfs/super.h2
6 files changed, 13 insertions, 10 deletions
diff --git a/include/sqfs/dir.h b/include/sqfs/dir.h
index 19c1289..ff53ce5 100644
--- a/include/sqfs/dir.h
+++ b/include/sqfs/dir.h
@@ -254,7 +254,7 @@ SQFS_API int sqfs_dir_writer_end(sqfs_dir_writer_t *writer);
*
* @return The size of the entire, uncompressed listing in bytes.
*/
-SQFS_API size_t sqfs_dir_writer_get_size(sqfs_dir_writer_t *writer);
+SQFS_API size_t sqfs_dir_writer_get_size(const sqfs_dir_writer_t *writer);
/**
* @brief Get the location of the last written directory.
@@ -269,7 +269,8 @@ SQFS_API size_t sqfs_dir_writer_get_size(sqfs_dir_writer_t *writer);
* @return A meta data reference, i.e. bits 16 to 48 contain the block start
* and the lower 16 bit an offset into the uncompressed block.
*/
-SQFS_API uint64_t sqfs_dir_writer_get_dir_reference(sqfs_dir_writer_t *writer);
+SQFS_API uint64_t
+sqfs_dir_writer_get_dir_reference(const sqfs_dir_writer_t *writer);
/**
* @brief Get the size of the index of the last written directory.
@@ -283,7 +284,7 @@ SQFS_API uint64_t sqfs_dir_writer_get_dir_reference(sqfs_dir_writer_t *writer);
*
* @return The number of index entries.
*/
-SQFS_API size_t sqfs_dir_writer_get_index_size(sqfs_dir_writer_t *writer);
+SQFS_API size_t sqfs_dir_writer_get_index_size(const sqfs_dir_writer_t *writer);
/**
* @brief Write the index of the index of the last written directory to
@@ -296,7 +297,7 @@ SQFS_API size_t sqfs_dir_writer_get_index_size(sqfs_dir_writer_t *writer);
*
* @return Zero on success, a @ref E_SQFS_ERROR value on failure.
*/
-SQFS_API int sqfs_dir_writer_write_index(sqfs_dir_writer_t *writer,
+SQFS_API int sqfs_dir_writer_write_index(const sqfs_dir_writer_t *writer,
sqfs_meta_writer_t *im);
#ifdef __cplusplus
diff --git a/include/sqfs/id_table.h b/include/sqfs/id_table.h
index 6c39cf2..c9e6b9b 100644
--- a/include/sqfs/id_table.h
+++ b/include/sqfs/id_table.h
@@ -107,7 +107,8 @@ SQFS_API int sqfs_id_table_write(sqfs_id_table_t *tbl, sqfs_file_t *file,
* @return Zero on success, an @ref E_SQFS_ERROR on failure.
*/
SQFS_API int sqfs_id_table_read(sqfs_id_table_t *tbl, sqfs_file_t *file,
- sqfs_super_t *super, sqfs_compressor_t *cmp);
+ const sqfs_super_t *super,
+ sqfs_compressor_t *cmp);
/**
* @brief Resolve a 16 bit index to a 32 bit ID.
diff --git a/include/sqfs/io.h b/include/sqfs/io.h
index 9288010..0f980d6 100644
--- a/include/sqfs/io.h
+++ b/include/sqfs/io.h
@@ -105,7 +105,7 @@ struct sqfs_file_t {
*
* @param file A pointer to the file object.
*/
- uint64_t (*get_size)(sqfs_file_t *file);
+ uint64_t (*get_size)(const sqfs_file_t *file);
/**
* @brief Extend or shrink a file to a specified size.
diff --git a/include/sqfs/meta_reader.h b/include/sqfs/meta_reader.h
index 989e857..c03c0f6 100644
--- a/include/sqfs/meta_reader.h
+++ b/include/sqfs/meta_reader.h
@@ -104,7 +104,7 @@ SQFS_API int sqfs_meta_reader_seek(sqfs_meta_reader_t *m, uint64_t block_start,
* @param block_start Absolute position where the current block is.
* @param offset A byte offset into the uncompressed block.
*/
-SQFS_API void sqfs_meta_reader_get_position(sqfs_meta_reader_t *m,
+SQFS_API void sqfs_meta_reader_get_position(const sqfs_meta_reader_t *m,
uint64_t *block_start,
size_t *offset);
@@ -179,7 +179,8 @@ SQFS_API int sqfs_meta_reader_read_dir_ent(sqfs_meta_reader_t *m,
* @return Zero on success, an @ref E_SQFS_ERROR value on failure.
*/
SQFS_API
-int sqfs_meta_reader_read_inode(sqfs_meta_reader_t *ir, sqfs_super_t *super,
+int sqfs_meta_reader_read_inode(sqfs_meta_reader_t *ir,
+ const sqfs_super_t *super,
uint64_t block_start, size_t offset,
sqfs_inode_generic_t **out);
diff --git a/include/sqfs/meta_writer.h b/include/sqfs/meta_writer.h
index c0d5716..c1b2383 100644
--- a/include/sqfs/meta_writer.h
+++ b/include/sqfs/meta_writer.h
@@ -176,7 +176,7 @@ SQFS_API int sqfs_meta_write_write_to_file(sqfs_meta_writer_t *m);
* @return Zero on success, an @ref E_SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_meta_writer_write_inode(sqfs_meta_writer_t *iw,
- sqfs_inode_generic_t *n);
+ const sqfs_inode_generic_t *n);
#ifdef __cplusplus
}
diff --git a/include/sqfs/super.h b/include/sqfs/super.h
index 5e6c00a..aea2394 100644
--- a/include/sqfs/super.h
+++ b/include/sqfs/super.h
@@ -301,7 +301,7 @@ SQFS_API int sqfs_super_init(sqfs_super_t *super, size_t block_size,
* @return Zero on success, an @ref E_SQFS_ERROR value if one of the
* fields does not hold a valid value.
*/
-SQFS_API int sqfs_super_write(sqfs_super_t *super, sqfs_file_t *file);
+SQFS_API int sqfs_super_write(const sqfs_super_t *super, sqfs_file_t *file);
/**
* @brief Read a SquashFS super block from disk, decode it and check the fields