summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sqfs/block.h55
-rw-r--r--include/sqfs/predef.h1
-rw-r--r--lib/sqfs/block_processor/internal.h15
3 files changed, 16 insertions, 55 deletions
diff --git a/include/sqfs/block.h b/include/sqfs/block.h
index 1098c96..30fcc1d 100644
--- a/include/sqfs/block.h
+++ b/include/sqfs/block.h
@@ -25,8 +25,7 @@
/**
* @file block.h
*
- * @brief Contains on-disk data structures for data block management,
- * helper macros and the higher level @ref sqfs_block_t structure.
+ * @brief Contains on-disk data structures for data block management.
*/
#define SQFS_META_BLOCK_SIZE 8192
@@ -125,56 +124,4 @@ typedef enum {
SQFS_BLK_USER_SETTABLE_FLAGS = 0x0007,
} E_SQFS_BLK_FLAGS;
-/**
- * @struct sqfs_block_t
- *
- * @brief Encapsulates a chunk of data to be processed by the block processor.
- */
-struct sqfs_block_t {
- /**
- * @brief Used internally, existing value is ignored and overwritten
- * when enqueueing a block.
- */
- sqfs_block_t *next;
-
- /**
- * @brief Used internally, existing value is ignored and overwritten
- * when enqueueing a block.
- */
- sqfs_u32 sequence_number;
-
- /**
- * @brief Size of the data area.
- */
- sqfs_u32 size;
-
- /**
- * @brief Checksum of the input data.
- */
- sqfs_u32 checksum;
-
- /**
- * @brief Data block index within the inode.
- */
- sqfs_u32 index;
-
- /**
- * @brief The squashfs inode related to this block.
- */
- sqfs_inode_generic_t *inode;
-
- /**
- * @brief User settable flag field.
- *
- * A combination of @ref E_SQFS_BLK_FLAGS and custom, user
- * settable flags.
- */
- sqfs_u32 flags;
-
- /**
- * @brief Raw data to be processed.
- */
- sqfs_u8 data[];
-};
-
#endif /* SQFS_BLOCK_H */
diff --git a/include/sqfs/predef.h b/include/sqfs/predef.h
index 87d7788..d8cc293 100644
--- a/include/sqfs/predef.h
+++ b/include/sqfs/predef.h
@@ -67,7 +67,6 @@ typedef int16_t sqfs_s16;
typedef int32_t sqfs_s32;
typedef int64_t sqfs_s64;
-typedef struct sqfs_block_t sqfs_block_t;
typedef struct sqfs_block_processor_t sqfs_block_processor_t;
typedef struct sqfs_compressor_config_t sqfs_compressor_config_t;
typedef struct sqfs_compressor_t sqfs_compressor_t;
diff --git a/lib/sqfs/block_processor/internal.h b/lib/sqfs/block_processor/internal.h
index 847b2c6..b3d76ba 100644
--- a/lib/sqfs/block_processor/internal.h
+++ b/lib/sqfs/block_processor/internal.h
@@ -34,6 +34,21 @@
typedef struct compress_worker_t compress_worker_t;
+typedef struct sqfs_block_t {
+ struct sqfs_block_t *next;
+ sqfs_inode_generic_t *inode;
+
+ sqfs_u32 sequence_number;
+ sqfs_u32 flags;
+ sqfs_u32 size;
+ sqfs_u32 checksum;
+
+ /* Data block index within the inode or fragment block index. */
+ sqfs_u32 index;
+
+ sqfs_u8 data[];
+} sqfs_block_t;
+
struct sqfs_block_processor_t {
/* synchronization primitives */
#ifdef WITH_PTHREAD