aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sqfs/io.h19
-rw-r--r--lib/sqfs/Makemodule.am2
-rw-r--r--lib/sqfs/io.c39
3 files changed, 1 insertions, 59 deletions
diff --git a/include/sqfs/io.h b/include/sqfs/io.h
index 5c1bfd5..0f980d6 100644
--- a/include/sqfs/io.h
+++ b/include/sqfs/io.h
@@ -142,25 +142,6 @@ extern "C" {
*/
SQFS_API sqfs_file_t *sqfs_open_file(const char *filename, int flags);
-/**
- * @brief Read a chunk from a file and turn it into a block that can be
- * fed to a block processor.
- *
- * @member sqfs_file_t
- *
- * @param file A pointer to a file implementation.
- * @param offset A byte offset into the file.
- * @param size The number of bytes to read, starting at the given offset.
- * @param inode The inode pointer to set for the block.
- * @param flags The flags to store in the newly created block.
- * @param out Returns a pointer to a block on success.
- *
- * @return Zero on success, an @ref E_SQFS_ERROR identifier on failure.
- */
-SQFS_API int sqfs_file_create_block(sqfs_file_t *file, uint64_t offset,
- size_t size, sqfs_inode_generic_t *inode,
- uint32_t flags, sqfs_block_t **out);
-
#ifdef __cplusplus
}
#endif
diff --git a/lib/sqfs/Makemodule.am b/lib/sqfs/Makemodule.am
index a474423..b4744d4 100644
--- a/lib/sqfs/Makemodule.am
+++ b/lib/sqfs/Makemodule.am
@@ -18,7 +18,7 @@ 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/dir_reader.c lib/sqfs/read_tree.c
libsquashfs_la_SOURCES += lib/sqfs/inode.c lib/sqfs/data_writer/fragment.c
-libsquashfs_la_SOURCES += lib/sqfs/data_writer/block.c lib/sqfs/io.c
+libsquashfs_la_SOURCES += lib/sqfs/data_writer/block.c
libsquashfs_la_SOURCES += lib/sqfs/data_writer/internal.h lib/sqfs/data_reader.c
libsquashfs_la_SOURCES += lib/sqfs/data_writer/common.c
libsquashfs_la_SOURCES += lib/sqfs/data_writer/fileapi.c
diff --git a/lib/sqfs/io.c b/lib/sqfs/io.c
deleted file mode 100644
index 0021a30..0000000
--- a/lib/sqfs/io.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* SPDX-License-Identifier: LGPL-3.0-or-later */
-/*
- * io.c
- *
- * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
- */
-#define SQFS_BUILDING_DLL
-#include "config.h"
-
-#include "sqfs/io.h"
-#include "sqfs/error.h"
-#include "sqfs/block.h"
-#include "util.h"
-
-#include <stdlib.h>
-
-int sqfs_file_create_block(sqfs_file_t *file, uint64_t offset,
- size_t size, sqfs_inode_generic_t *inode,
- uint32_t flags, sqfs_block_t **out)
-{
- sqfs_block_t *blk = alloc_flex(sizeof(*blk), 1, size);
- int err;
-
- if (blk == NULL)
- return SQFS_ERROR_ALLOC;
-
- err = file->read_at(file, offset, blk->data, size);
- if (err) {
- free(blk);
- return err;
- }
-
- blk->inode = inode;
- blk->size = size;
- blk->flags = flags;
-
- *out = blk;
- return 0;
-}