summaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 14:44:08 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 14:47:30 +0200
commitc2b37956b0c32c78ec017617509038e051bb08fb (patch)
tree9d76f4a5719ceb07c0370d10ac707213f3af3d0e /lib/sqfs
parent3b7f4dbb284462ef7065e19f1725f615973477da (diff)
Cleanup: move "create_block" from block processor over to data writer
It only has one user and is quite specialized actually. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/comp/create_block.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/sqfs/comp/create_block.c b/lib/sqfs/comp/create_block.c
deleted file mode 100644
index 0494e73..0000000
--- a/lib/sqfs/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 "sqfs/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;
-}