summaryrefslogtreecommitdiff
path: root/lib/comp/create_block.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-31 16:22:31 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-31 16:22:31 +0200
commit9b3d958fb7c37855a63ed75707281c61dc1d44c4 (patch)
tree053c117a09a7eb83b2d17dc582668979cf344102 /lib/comp/create_block.c
parentf7801346c0913032e99105088b962a986edb24f4 (diff)
Merge libcompress.a into libsquashfs.a
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/comp/create_block.c')
-rw-r--r--lib/comp/create_block.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/comp/create_block.c b/lib/comp/create_block.c
deleted file mode 100644
index 90344bb..0000000
--- a/lib/comp/create_block.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-3.0-or-later */
-/*
- * create_block.c
- *
- * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
- */
-#include "config.h"
-
-#include "block_processor.h"
-#include "util.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-block_t *create_block(const char *filename, int fd, size_t size,
- void *user, uint32_t flags)
-{
- block_t *blk = alloc_flex(sizeof(*blk), 1, size);
-
- if (blk == NULL) {
- perror(filename);
- return NULL;
- }
-
- if (fd >= 0) {
- if (read_data(filename, fd, blk->data, size)) {
- free(blk);
- return NULL;
- }
- }
-
- blk->size = size;
- blk->user = user;
- blk->flags = flags;
- return blk;
-}