summaryrefslogtreecommitdiff
path: root/lib/sqfs/io.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-26 18:57:50 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-26 18:57:50 +0200
commitfa66e0d92d1441ab95d720728f1fb54177d5edd5 (patch)
treeb975ea41a1b85c16a7c70e2bb45e993e91cf6ff9 /lib/sqfs/io.c
parent9ed84dac57944149e05646960a715d8f98dabcc5 (diff)
Remove the create I/O block from sqfs_file_t function
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/io.c')
-rw-r--r--lib/sqfs/io.c39
1 files changed, 0 insertions, 39 deletions
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;
-}