aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/frag_reader.h13
-rw-r--r--lib/sqfs/frag_reader.c12
2 files changed, 13 insertions, 12 deletions
diff --git a/include/frag_reader.h b/include/frag_reader.h
index 623cc8d..5c538e4 100644
--- a/include/frag_reader.h
+++ b/include/frag_reader.h
@@ -8,18 +8,7 @@
#include <stdint.h>
#include <stddef.h>
-/* A simple interface for accessing fragments in a SquashFS image */
-typedef struct {
- sqfs_fragment_t *tbl;
- size_t num_fragments;
-
- int fd;
- compressor_t *cmp;
- size_t block_size;
- size_t used;
- size_t current_index;
- uint8_t buffer[];
-} frag_reader_t;
+typedef struct frag_reader_t frag_reader_t;
/* Reads and decodes the fragment table from the image. Cleans up after itself
and prints error messages to stderr on the way if it fails. */
diff --git a/lib/sqfs/frag_reader.c b/lib/sqfs/frag_reader.c
index 74fd292..02d813e 100644
--- a/lib/sqfs/frag_reader.c
+++ b/lib/sqfs/frag_reader.c
@@ -8,6 +8,18 @@
#include <stdlib.h>
#include <stdio.h>
+struct frag_reader_t {
+ sqfs_fragment_t *tbl;
+ size_t num_fragments;
+
+ int fd;
+ compressor_t *cmp;
+ size_t block_size;
+ size_t used;
+ size_t current_index;
+ uint8_t buffer[];
+};
+
static int precache_block(frag_reader_t *f, size_t i)
{
bool compressed;