From fa66e0d92d1441ab95d720728f1fb54177d5edd5 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 26 Sep 2019 18:57:50 +0200 Subject: Remove the create I/O block from sqfs_file_t function Signed-off-by: David Oberhollenzer --- lib/sqfs/Makemodule.am | 2 +- lib/sqfs/io.c | 39 --------------------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 lib/sqfs/io.c (limited to 'lib/sqfs') 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 - */ -#define SQFS_BUILDING_DLL -#include "config.h" - -#include "sqfs/io.h" -#include "sqfs/error.h" -#include "sqfs/block.h" -#include "util.h" - -#include - -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; -} -- cgit v1.2.3