aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sqfs/block_processor.h16
-rw-r--r--lib/sqfs/Makemodule.am1
-rw-r--r--lib/sqfs/blk_proc/internal.h16
-rw-r--r--lib/sqfs/blk_proc/process_block.c6
-rw-r--r--lib/sqfs/blk_proc/pthread.c7
-rw-r--r--lib/sqfs/blk_proc/serial.c6
6 files changed, 20 insertions, 32 deletions
diff --git a/include/sqfs/block_processor.h b/include/sqfs/block_processor.h
index 1032a35..4b9bb9f 100644
--- a/include/sqfs/block_processor.h
+++ b/include/sqfs/block_processor.h
@@ -222,22 +222,6 @@ SQFS_API int sqfs_block_processor_enqueue(sqfs_block_processor_t *proc,
*/
SQFS_API int sqfs_block_processor_finish(sqfs_block_processor_t *proc);
-/**
- * @brief Convenience function to process a data block.
- *
- * This function actually contains the implementation of what each worker in
- * the block processor actually does to the data blocks.
- *
- * @param block A pointer to a data block.
- * @param cmp A pointer to a compressor to use.
- * @param scratch A pointer to a scratch buffer to user for compressing.
- * @param scratch_size The available size in the scratch buffer.
- *
- * @return Zero on success, an @ref E_SQFS_ERROR value on failure.
- */
-SQFS_API int sqfs_block_process(sqfs_block_t *block, sqfs_compressor_t *cmp,
- uint8_t *scratch, size_t scratch_size);
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/sqfs/Makemodule.am b/lib/sqfs/Makemodule.am
index 4b8d964..7199441 100644
--- a/lib/sqfs/Makemodule.am
+++ b/lib/sqfs/Makemodule.am
@@ -15,6 +15,7 @@ libsquashfs_la_SOURCES += lib/sqfs/dir_writer.c lib/sqfs/xattr_reader.c
libsquashfs_la_SOURCES += lib/sqfs/read_table.c lib/sqfs/comp/compressor.c
libsquashfs_la_SOURCES += lib/sqfs/comp/internal.h
libsquashfs_la_SOURCES += lib/sqfs/blk_proc/process_block.c
+libsquashfs_la_SOURCES += lib/sqfs/blk_proc/internal.h
libsquashfs_la_CPPFLAGS = $(AM_CPPFLAGS)
libsquashfs_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS)
libsquashfs_la_CFLAGS += $(XZ_CFLAGS) $(LZO_CFLAGS) $(LZ4_CFLAGS)
diff --git a/lib/sqfs/blk_proc/internal.h b/lib/sqfs/blk_proc/internal.h
new file mode 100644
index 0000000..1c33999
--- /dev/null
+++ b/lib/sqfs/blk_proc/internal.h
@@ -0,0 +1,16 @@
+#ifndef INTERNAL_H
+#define INTERNAL_H
+
+#include "config.h"
+#include "sqfs/predef.h"
+
+#include "sqfs/block_processor.h"
+#include "sqfs/compress.h"
+#include "sqfs/error.h"
+#include "util.h"
+
+SQFS_INTERNAL
+int sqfs_block_process(sqfs_block_t *block, sqfs_compressor_t *cmp,
+ uint8_t *scratch, size_t scratch_size);
+
+#endif /* INTERNAL_H */
diff --git a/lib/sqfs/blk_proc/process_block.c b/lib/sqfs/blk_proc/process_block.c
index 3289767..0eae244 100644
--- a/lib/sqfs/blk_proc/process_block.c
+++ b/lib/sqfs/blk_proc/process_block.c
@@ -5,11 +5,7 @@
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
#define SQFS_BUILDING_DLL
-#include "config.h"
-
-#include "sqfs/block_processor.h"
-#include "sqfs/compress.h"
-#include "util.h"
+#include "internal.h"
#include <string.h>
#include <zlib.h>
diff --git a/lib/sqfs/blk_proc/pthread.c b/lib/sqfs/blk_proc/pthread.c
index a00bf12..f56dfe1 100644
--- a/lib/sqfs/blk_proc/pthread.c
+++ b/lib/sqfs/blk_proc/pthread.c
@@ -5,12 +5,7 @@
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
#define SQFS_BUILDING_DLL
-#include "config.h"
-
-#include "sqfs/block_processor.h"
-#include "sqfs/compress.h"
-#include "sqfs/error.h"
-#include "util.h"
+#include "internal.h"
#include <pthread.h>
#include <string.h>
diff --git a/lib/sqfs/blk_proc/serial.c b/lib/sqfs/blk_proc/serial.c
index ef71f9e..85f39fe 100644
--- a/lib/sqfs/blk_proc/serial.c
+++ b/lib/sqfs/blk_proc/serial.c
@@ -5,11 +5,7 @@
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
#define SQFS_BUILDING_DLL
-#include "config.h"
-
-#include "sqfs/block_processor.h"
-#include "sqfs/error.h"
-#include "util.h"
+#include "internal.h"
#include <string.h>
#include <stdlib.h>