diff options
Diffstat (limited to 'lib/io')
-rw-r--r-- | lib/io/src/dir_tree_iterator.c | 2 | ||||
-rw-r--r-- | lib/io/src/get_line.c | 2 | ||||
-rw-r--r-- | lib/io/src/istream.c | 6 | ||||
-rw-r--r-- | lib/io/src/mem.c | 14 | ||||
-rw-r--r-- | lib/io/src/unix/dir_iterator.c | 2 | ||||
-rw-r--r-- | lib/io/src/unix/istream.c | 20 | ||||
-rw-r--r-- | lib/io/src/unix/ostream.c | 18 | ||||
-rw-r--r-- | lib/io/src/win32/dir_iterator.c | 2 | ||||
-rw-r--r-- | lib/io/src/win32/istream.c | 20 | ||||
-rw-r--r-- | lib/io/src/win32/ostream.c | 18 | ||||
-rw-r--r-- | lib/io/src/xfrm/istream.c | 16 | ||||
-rw-r--r-- | lib/io/src/xfrm/ostream.c | 14 | ||||
-rw-r--r-- | lib/io/test/get_line.c | 2 | ||||
-rw-r--r-- | lib/io/test/istream_mem.c | 2 | ||||
-rw-r--r-- | lib/io/test/istream_read.c | 2 | ||||
-rw-r--r-- | lib/io/test/istream_skip.c | 2 | ||||
-rw-r--r-- | lib/io/test/stream_splice.c | 8 | ||||
-rw-r--r-- | lib/io/test/xfrm.c | 14 |
18 files changed, 82 insertions, 82 deletions
diff --git a/lib/io/src/dir_tree_iterator.c b/lib/io/src/dir_tree_iterator.c index 25cb1d9..4303817 100644 --- a/lib/io/src/dir_tree_iterator.c +++ b/lib/io/src/dir_tree_iterator.c @@ -272,7 +272,7 @@ static void ignore_subdir(dir_iterator_t *base) pop(it); } -static int open_file_ro(dir_iterator_t *base, istream_t **out) +static int open_file_ro(dir_iterator_t *base, sqfs_istream_t **out) { dir_tree_iterator_t *it = (dir_tree_iterator_t *)base; diff --git a/lib/io/src/get_line.c b/lib/io/src/get_line.c index 7ebce0e..9ab4928 100644 --- a/lib/io/src/get_line.c +++ b/lib/io/src/get_line.c @@ -38,7 +38,7 @@ static size_t trim(char *buffer, int flags) return strlen(buffer); } -int istream_get_line(istream_t *strm, char **out, +int istream_get_line(sqfs_istream_t *strm, char **out, size_t *line_num, int flags) { char *line = NULL, *new; diff --git a/lib/io/src/istream.c b/lib/io/src/istream.c index 473f1af..6fbc67b 100644 --- a/lib/io/src/istream.c +++ b/lib/io/src/istream.c @@ -7,7 +7,7 @@ #include "internal.h" -sqfs_s32 istream_read(istream_t *strm, void *data, size_t size) +sqfs_s32 istream_read(sqfs_istream_t *strm, void *data, size_t size) { sqfs_s32 total = 0; @@ -38,7 +38,7 @@ sqfs_s32 istream_read(istream_t *strm, void *data, size_t size) return total; } -int istream_skip(istream_t *strm, sqfs_u64 size) +int istream_skip(sqfs_istream_t *strm, sqfs_u64 size) { while (size > 0) { const sqfs_u8 *ptr; @@ -64,7 +64,7 @@ int istream_skip(istream_t *strm, sqfs_u64 size) return 0; } -sqfs_s32 istream_splice(istream_t *in, ostream_t *out, sqfs_u32 size) +sqfs_s32 istream_splice(sqfs_istream_t *in, sqfs_ostream_t *out, sqfs_u32 size) { sqfs_s32 total = 0; diff --git a/lib/io/src/mem.c b/lib/io/src/mem.c index bbb186a..435a169 100644 --- a/lib/io/src/mem.c +++ b/lib/io/src/mem.c @@ -13,7 +13,7 @@ #include <assert.h> typedef struct { - istream_t base; + sqfs_istream_t base; sqfs_u8 *buffer; size_t bufsz; @@ -26,7 +26,7 @@ typedef struct { char *name; } mem_istream_t; -static int mem_get_buffered_data(istream_t *strm, const sqfs_u8 **out, +static int mem_get_buffered_data(sqfs_istream_t *strm, const sqfs_u8 **out, size_t *size, size_t want) { mem_istream_t *mem = (mem_istream_t *)strm; @@ -50,7 +50,7 @@ static int mem_get_buffered_data(istream_t *strm, const sqfs_u8 **out, return (mem->visible == 0) ? 1 : 0; } -static void mem_advance_buffer(istream_t *strm, size_t count) +static void mem_advance_buffer(sqfs_istream_t *strm, size_t count) { mem_istream_t *mem = (mem_istream_t *)strm; @@ -68,7 +68,7 @@ static void mem_advance_buffer(istream_t *strm, size_t count) } } -static const char *mem_in_get_filename(istream_t *strm) +static const char *mem_in_get_filename(sqfs_istream_t *strm) { return ((mem_istream_t *)strm)->name; } @@ -80,11 +80,11 @@ static void mem_in_destroy(sqfs_object_t *obj) free(obj); } -istream_t *istream_memory_create(const char *name, size_t bufsz, - const void *data, size_t size) +sqfs_istream_t *istream_memory_create(const char *name, size_t bufsz, + const void *data, size_t size) { mem_istream_t *mem = calloc(1, sizeof(*mem)); - istream_t *strm = (istream_t *)mem; + sqfs_istream_t *strm = (sqfs_istream_t *)mem; if (mem == NULL) return NULL; diff --git a/lib/io/src/unix/dir_iterator.c b/lib/io/src/unix/dir_iterator.c index 9ba200f..5129eb0 100644 --- a/lib/io/src/unix/dir_iterator.c +++ b/lib/io/src/unix/dir_iterator.c @@ -127,7 +127,7 @@ static void dir_ignore_subdir(dir_iterator_t *it) (void)it; } -static int dir_open_file_ro(dir_iterator_t *it, istream_t **out) +static int dir_open_file_ro(dir_iterator_t *it, sqfs_istream_t **out) { (void)it; *out = NULL; diff --git a/lib/io/src/unix/istream.c b/lib/io/src/unix/istream.c index e96bc6c..fc76bab 100644 --- a/lib/io/src/unix/istream.c +++ b/lib/io/src/unix/istream.c @@ -7,7 +7,7 @@ #include "../internal.h" typedef struct { - istream_t base; + sqfs_istream_t base; char *path; int fd; @@ -17,7 +17,7 @@ typedef struct { sqfs_u8 buffer[BUFSZ]; } file_istream_t; -static int precache(istream_t *strm) +static int precache(sqfs_istream_t *strm) { file_istream_t *file = (file_istream_t *)strm; @@ -56,7 +56,7 @@ static int precache(istream_t *strm) return 0; } -static int file_get_buffered_data(istream_t *strm, const sqfs_u8 **out, +static int file_get_buffered_data(sqfs_istream_t *strm, const sqfs_u8 **out, size_t *size, size_t want) { file_istream_t *file = (file_istream_t *)strm; @@ -76,7 +76,7 @@ static int file_get_buffered_data(istream_t *strm, const sqfs_u8 **out, return (file->eof && *size == 0) ? 1 : 0; } -static void file_advance_buffer(istream_t *strm, size_t count) +static void file_advance_buffer(sqfs_istream_t *strm, size_t count) { file_istream_t *file = (file_istream_t *)strm; @@ -87,7 +87,7 @@ static void file_advance_buffer(istream_t *strm, size_t count) assert(file->buffer_offset <= file->buffer_used); } -static const char *file_get_filename(istream_t *strm) +static const char *file_get_filename(sqfs_istream_t *strm) { file_istream_t *file = (file_istream_t *)strm; @@ -105,10 +105,10 @@ static void file_destroy(sqfs_object_t *obj) free(file); } -istream_t *istream_open_handle(const char *path, int fd) +sqfs_istream_t *istream_open_handle(const char *path, int fd) { file_istream_t *file = calloc(1, sizeof(*file)); - istream_t *strm = (istream_t *)file; + sqfs_istream_t *strm = (sqfs_istream_t *)file; if (file == NULL) { perror(path); @@ -141,9 +141,9 @@ fail_free: return NULL; } -istream_t *istream_open_file(const char *path) +sqfs_istream_t *istream_open_file(const char *path) { - istream_t *out; + sqfs_istream_t *out; int fd; fd = open(path, O_RDONLY); @@ -159,7 +159,7 @@ istream_t *istream_open_file(const char *path) return out; } -istream_t *istream_open_stdin(void) +sqfs_istream_t *istream_open_stdin(void) { return istream_open_handle("stdin", STDIN_FILENO); } diff --git a/lib/io/src/unix/ostream.c b/lib/io/src/unix/ostream.c index 7093cc2..0e95167 100644 --- a/lib/io/src/unix/ostream.c +++ b/lib/io/src/unix/ostream.c @@ -8,7 +8,7 @@ #include "sqfs/io.h" typedef struct { - ostream_t base; + sqfs_ostream_t base; char *path; int flags; int fd; @@ -85,7 +85,7 @@ fail: return -1; } -static int file_append(ostream_t *strm, const void *data, size_t size) +static int file_append(sqfs_ostream_t *strm, const void *data, size_t size) { file_ostream_t *file = (file_ostream_t *)strm; @@ -104,7 +104,7 @@ static int file_append(ostream_t *strm, const void *data, size_t size) return write_all(file, data, size); } -static int file_flush(ostream_t *strm) +static int file_flush(sqfs_ostream_t *strm) { file_ostream_t *file = (file_ostream_t *)strm; @@ -130,17 +130,17 @@ static void file_destroy(sqfs_object_t *obj) free(file); } -static const char *file_get_filename(ostream_t *strm) +static const char *file_get_filename(sqfs_ostream_t *strm) { file_ostream_t *file = (file_ostream_t *)strm; return file->path; } -ostream_t *ostream_open_handle(const char *path, int fd, int flags) +sqfs_ostream_t *ostream_open_handle(const char *path, int fd, int flags) { file_ostream_t *file = calloc(1, sizeof(*file)); - ostream_t *strm = (ostream_t *)file; + sqfs_ostream_t *strm = (sqfs_ostream_t *)file; if (file == NULL) { perror(path); @@ -175,9 +175,9 @@ fail_free: return NULL; } -ostream_t *ostream_open_file(const char *path, int flags) +sqfs_ostream_t *ostream_open_file(const char *path, int flags) { - ostream_t *out; + sqfs_ostream_t *out; int fd; if (flags & SQFS_FILE_OPEN_OVERWRITE) { @@ -193,7 +193,7 @@ ostream_t *ostream_open_file(const char *path, int flags) return out; } -ostream_t *ostream_open_stdout(void) +sqfs_ostream_t *ostream_open_stdout(void) { return ostream_open_handle("stdout", STDOUT_FILENO, SQFS_FILE_OPEN_NO_SPARSE); diff --git a/lib/io/src/win32/dir_iterator.c b/lib/io/src/win32/dir_iterator.c index b1045f1..c99fd64 100644 --- a/lib/io/src/win32/dir_iterator.c +++ b/lib/io/src/win32/dir_iterator.c @@ -115,7 +115,7 @@ static void dir_iterator_ignore_subdir(dir_iterator_t *it) (void)it; } -static int dir_iterator_open_file_ro(dir_iterator_t *it, istream_t **out) +static int dir_iterator_open_file_ro(dir_iterator_t *it, sqfs_istream_t **out) { (void)it; *out = NULL; diff --git a/lib/io/src/win32/istream.c b/lib/io/src/win32/istream.c index d140142..223b20d 100644 --- a/lib/io/src/win32/istream.c +++ b/lib/io/src/win32/istream.c @@ -10,7 +10,7 @@ #include <windows.h> typedef struct { - istream_t base; + sqfs_istream_t base; char *path; HANDLE hnd; @@ -20,7 +20,7 @@ typedef struct { sqfs_u8 buffer[BUFSZ]; } file_istream_t; -static int precache(istream_t *strm) +static int precache(sqfs_istream_t *strm) { file_istream_t *file = (file_istream_t *)strm; DWORD diff, actual; @@ -66,7 +66,7 @@ static int precache(istream_t *strm) return 0; } -static int file_get_buffered_data(istream_t *strm, const sqfs_u8 **out, +static int file_get_buffered_data(sqfs_istream_t *strm, const sqfs_u8 **out, size_t *size, size_t want) { file_istream_t *file = (file_istream_t *)strm; @@ -86,7 +86,7 @@ static int file_get_buffered_data(istream_t *strm, const sqfs_u8 **out, return (file->eof && *size == 0) ? 1 : 0; } -static void file_advance_buffer(istream_t *strm, size_t count) +static void file_advance_buffer(sqfs_istream_t *strm, size_t count) { file_istream_t *file = (file_istream_t *)strm; @@ -97,7 +97,7 @@ static void file_advance_buffer(istream_t *strm, size_t count) assert(file->buffer_offset <= file->buffer_used); } -static const char *file_get_filename(istream_t *strm) +static const char *file_get_filename(sqfs_istream_t *strm) { return ((file_istream_t *)strm)->path; } @@ -111,10 +111,10 @@ static void file_destroy(sqfs_object_t *obj) free(file); } -istream_t *istream_open_handle(const char *path, HANDLE hnd) +sqfs_istream_t *istream_open_handle(const char *path, HANDLE hnd) { file_istream_t *file = calloc(1, sizeof(*file)); - istream_t *strm = (istream_t *)file; + sqfs_istream_t *strm = (sqfs_istream_t *)file; BOOL ret; if (file == NULL) { @@ -151,10 +151,10 @@ fail_free: return NULL; } -istream_t *istream_open_file(const char *path) +sqfs_istream_t *istream_open_file(const char *path) { WCHAR *wpath = NULL; - istream_t *out; + sqfs_istream_t *out; HANDLE hnd; wpath = path_to_windows(path); @@ -179,7 +179,7 @@ istream_t *istream_open_file(const char *path) return out; } -istream_t *istream_open_stdin(void) +sqfs_istream_t *istream_open_stdin(void) { HANDLE hnd = GetStdHandle(STD_INPUT_HANDLE); diff --git a/lib/io/src/win32/ostream.c b/lib/io/src/win32/ostream.c index 26d6f96..5b099a4 100644 --- a/lib/io/src/win32/ostream.c +++ b/lib/io/src/win32/ostream.c @@ -11,7 +11,7 @@ #include <windows.h> typedef struct { - ostream_t base; + sqfs_ostream_t base; sqfs_u64 sparse_count; char *path; HANDLE hnd; @@ -84,7 +84,7 @@ fail: return -1; } -static int file_append(ostream_t *strm, const void *data, size_t size) +static int file_append(sqfs_ostream_t *strm, const void *data, size_t size) { file_ostream_t *file = (file_ostream_t *)strm; @@ -102,7 +102,7 @@ static int file_append(ostream_t *strm, const void *data, size_t size) return write_data(file, data, size); } -static int file_flush(ostream_t *strm) +static int file_flush(sqfs_ostream_t *strm) { file_ostream_t *file = (file_ostream_t *)strm; @@ -126,17 +126,17 @@ static void file_destroy(sqfs_object_t *obj) free(file); } -static const char *file_get_filename(ostream_t *strm) +static const char *file_get_filename(sqfs_ostream_t *strm) { file_ostream_t *file = (file_ostream_t *)strm; return file->path; } -ostream_t *ostream_open_handle(const char *path, HANDLE hnd, int flags) +sqfs_ostream_t *ostream_open_handle(const char *path, HANDLE hnd, int flags) { file_ostream_t *file = calloc(1, sizeof(*file)); - ostream_t *strm = (ostream_t *)file; + sqfs_ostream_t *strm = (sqfs_ostream_t *)file; BOOL ret; if (file == NULL) { @@ -174,11 +174,11 @@ fail_free: return NULL; } -ostream_t *ostream_open_file(const char *path, int flags) +sqfs_ostream_t *ostream_open_file(const char *path, int flags) { int access_flags, creation_mode; WCHAR *wpath = NULL; - ostream_t *out; + sqfs_ostream_t *out; HANDLE hnd; access_flags = GENERIC_WRITE; @@ -216,7 +216,7 @@ ostream_t *ostream_open_file(const char *path, int flags) return out; } -ostream_t *ostream_open_stdout(void) +sqfs_ostream_t *ostream_open_stdout(void) { HANDLE hnd = GetStdHandle(STD_OUTPUT_HANDLE); diff --git a/lib/io/src/xfrm/istream.c b/lib/io/src/xfrm/istream.c index 632409c..5c23d28 100644 --- a/lib/io/src/xfrm/istream.c +++ b/lib/io/src/xfrm/istream.c @@ -7,9 +7,9 @@ #include "../internal.h" typedef struct istream_xfrm_t { - istream_t base; + sqfs_istream_t base; - istream_t *wrapped; + sqfs_istream_t *wrapped; xfrm_stream_t *xfrm; size_t buffer_offset; @@ -17,7 +17,7 @@ typedef struct istream_xfrm_t { sqfs_u8 uncompressed[BUFSZ]; } istream_xfrm_t; -static int precache(istream_t *base) +static int precache(sqfs_istream_t *base) { istream_xfrm_t *xfrm = (istream_xfrm_t *)base; int ret; @@ -70,7 +70,7 @@ static int precache(istream_t *base) return 0; } -static int xfrm_get_buffered_data(istream_t *strm, const sqfs_u8 **out, +static int xfrm_get_buffered_data(sqfs_istream_t *strm, const sqfs_u8 **out, size_t *size, size_t want) { istream_xfrm_t *xfrm = (istream_xfrm_t *)strm; @@ -90,7 +90,7 @@ static int xfrm_get_buffered_data(istream_t *strm, const sqfs_u8 **out, return (*size == 0) ? 1 : 0; } -static void xfrm_advance_buffer(istream_t *strm, size_t count) +static void xfrm_advance_buffer(sqfs_istream_t *strm, size_t count) { istream_xfrm_t *xfrm = (istream_xfrm_t *)strm; @@ -101,7 +101,7 @@ static void xfrm_advance_buffer(istream_t *strm, size_t count) assert(xfrm->buffer_offset <= xfrm->buffer_used); } -static const char *xfrm_get_filename(istream_t *strm) +static const char *xfrm_get_filename(sqfs_istream_t *strm) { istream_xfrm_t *xfrm = (istream_xfrm_t *)strm; @@ -117,10 +117,10 @@ static void xfrm_destroy(sqfs_object_t *obj) free(xfrm); } -istream_t *istream_xfrm_create(istream_t *strm, xfrm_stream_t *xfrm) +sqfs_istream_t *istream_xfrm_create(sqfs_istream_t *strm, xfrm_stream_t *xfrm) { istream_xfrm_t *stream = calloc(1, sizeof(*stream)); - istream_t *base = (istream_t *)stream; + sqfs_istream_t *base = (sqfs_istream_t *)stream; if (stream == NULL) goto fail; diff --git a/lib/io/src/xfrm/ostream.c b/lib/io/src/xfrm/ostream.c index e55e38c..81c19dd 100644 --- a/lib/io/src/xfrm/ostream.c +++ b/lib/io/src/xfrm/ostream.c @@ -7,9 +7,9 @@ #include "../internal.h" typedef struct ostream_xfrm_t { - ostream_t base; + sqfs_ostream_t base; - ostream_t *wrapped; + sqfs_ostream_t *wrapped; xfrm_stream_t *xfrm; size_t inbuf_used; @@ -66,7 +66,7 @@ static int flush_inbuf(ostream_xfrm_t *xfrm, bool finish) return 0; } -static int xfrm_append(ostream_t *strm, const void *data, size_t size) +static int xfrm_append(sqfs_ostream_t *strm, const void *data, size_t size) { ostream_xfrm_t *xfrm = (ostream_xfrm_t *)strm; size_t diff; @@ -96,7 +96,7 @@ static int xfrm_append(ostream_t *strm, const void *data, size_t size) return 0; } -static int xfrm_flush(ostream_t *strm) +static int xfrm_flush(sqfs_ostream_t *strm) { ostream_xfrm_t *xfrm = (ostream_xfrm_t *)strm; @@ -108,7 +108,7 @@ static int xfrm_flush(ostream_t *strm) return xfrm->wrapped->flush(xfrm->wrapped); } -static const char *xfrm_get_filename(ostream_t *strm) +static const char *xfrm_get_filename(sqfs_ostream_t *strm) { ostream_xfrm_t *xfrm = (ostream_xfrm_t *)strm; @@ -124,10 +124,10 @@ static void xfrm_destroy(sqfs_object_t *obj) free(xfrm); } -ostream_t *ostream_xfrm_create(ostream_t *strm, xfrm_stream_t *xfrm) +sqfs_ostream_t *ostream_xfrm_create(sqfs_ostream_t *strm, xfrm_stream_t *xfrm) { ostream_xfrm_t *stream = calloc(1, sizeof(*stream)); - ostream_t *base = (ostream_t *)stream; + sqfs_ostream_t *base = (sqfs_ostream_t *)stream; if (stream == NULL) goto fail; diff --git a/lib/io/test/get_line.c b/lib/io/test/get_line.c index 0ce67ac..d300a3a 100644 --- a/lib/io/test/get_line.c +++ b/lib/io/test/get_line.c @@ -16,7 +16,7 @@ static void run_test_case(const char *raw, const line_t *lines, size_t count, int flags) { size_t i, line_num, old_line_num; - istream_t *fp; + sqfs_istream_t *fp; char *line; int ret; diff --git a/lib/io/test/istream_mem.c b/lib/io/test/istream_mem.c index ca5146c..f364fd3 100644 --- a/lib/io/test/istream_mem.c +++ b/lib/io/test/istream_mem.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) size_t i, diff, size; bool eat_all = true; const sqfs_u8 *ptr; - istream_t *in; + sqfs_istream_t *in; int ret; (void)argc; (void)argv; diff --git a/lib/io/test/istream_read.c b/lib/io/test/istream_read.c index 8ba4540..66fec4b 100644 --- a/lib/io/test/istream_read.c +++ b/lib/io/test/istream_read.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) { sqfs_u8 read_buffer[61]; sqfs_u64 read_off = 0; - istream_t *dummy; + sqfs_istream_t *dummy; (void)argc; (void)argv; init_rd_buffer(); diff --git a/lib/io/test/istream_skip.c b/lib/io/test/istream_skip.c index 3a02c8c..0fc3e11 100644 --- a/lib/io/test/istream_skip.c +++ b/lib/io/test/istream_skip.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) { sqfs_u8 read_buffer[61]; sqfs_u64 read_off = 0; - istream_t *dummy; + sqfs_istream_t *dummy; (void)argc; (void)argv; init_rd_buffer(); diff --git a/lib/io/test/stream_splice.c b/lib/io/test/stream_splice.c index 754f9cb..a9edd76 100644 --- a/lib/io/test/stream_splice.c +++ b/lib/io/test/stream_splice.c @@ -34,11 +34,11 @@ static void init_rd_buffer(void) /*****************************************************************************/ -static int out_append(ostream_t *strm, const void *data, size_t size); +static int out_append(sqfs_ostream_t *strm, const void *data, size_t size); static sqfs_u64 out_offset = 0; -static ostream_t out = { +static sqfs_ostream_t out = { { 1, NULL, NULL }, out_append, NULL, @@ -46,7 +46,7 @@ static ostream_t out = { NULL, }; -static int out_append(ostream_t *strm, const void *data, size_t size) +static int out_append(sqfs_ostream_t *strm, const void *data, size_t size) { const sqfs_u8 *ptr = data; @@ -69,7 +69,7 @@ static int out_append(ostream_t *strm, const void *data, size_t size) int main(int argc, char **argv) { sqfs_u64 total = 0; - istream_t *in; + sqfs_istream_t *in; sqfs_s32 ret; (void)argc; (void)argv; diff --git a/lib/io/test/xfrm.c b/lib/io/test/xfrm.c index 184db9e..1b48e6f 100644 --- a/lib/io/test/xfrm.c +++ b/lib/io/test/xfrm.c @@ -368,17 +368,17 @@ static size_t mo_written = 0; static sqfs_u8 mo_buffer[1024]; static bool mo_flushed = false; -static int mem_append(ostream_t *strm, const void *data, size_t size); -static int mem_flush(ostream_t *strm); +static int mem_append(sqfs_ostream_t *strm, const void *data, size_t size); +static int mem_flush(sqfs_ostream_t *strm); -static ostream_t mem_ostream = { +static sqfs_ostream_t mem_ostream = { { 1, NULL, NULL, }, mem_append, mem_flush, NULL, }; -static int mem_append(ostream_t *strm, const void *data, size_t size) +static int mem_append(sqfs_ostream_t *strm, const void *data, size_t size) { TEST_ASSERT(strm == &mem_ostream); TEST_ASSERT(size > 0); @@ -396,7 +396,7 @@ static int mem_append(ostream_t *strm, const void *data, size_t size) return 0; } -static int mem_flush(ostream_t *strm) +static int mem_flush(sqfs_ostream_t *strm) { TEST_ASSERT(strm == &mem_ostream); TEST_ASSERT(!mo_flushed); @@ -408,7 +408,7 @@ static int mem_flush(ostream_t *strm) static void run_unpack_test(const void *blob, size_t size) { - istream_t *istream, *mem_istream; + sqfs_istream_t *istream, *mem_istream; xfrm_stream_t *xfrm; sqfs_s32 ret; size_t i; @@ -450,8 +450,8 @@ static void run_unpack_test(const void *blob, size_t size) static void run_pack_test(void) { + sqfs_ostream_t *ostream; xfrm_stream_t *xfrm; - ostream_t *ostream; size_t i; int ret; |