summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/block.c8
-rw-r--r--mkfs/mkfs.h1
2 files changed, 1 insertions, 8 deletions
diff --git a/mkfs/block.c b/mkfs/block.c
index fadf9b9..eba8c24 100644
--- a/mkfs/block.c
+++ b/mkfs/block.c
@@ -43,7 +43,6 @@ static int write_block(file_info_t *fi, sqfs_info_t *info)
static int flush_fragments(sqfs_info_t *info)
{
size_t newsz, size;
- file_info_t *fi;
uint64_t offset;
void *new, *ptr;
ssize_t ret;
@@ -65,9 +64,6 @@ static int flush_fragments(sqfs_info_t *info)
offset = info->super.bytes_used;
size = info->frag_offset;
- for (fi = info->frag_list; fi != NULL; fi = fi->frag_next)
- fi->fragment = info->num_fragments;
-
ret = info->cmp->do_block(info->cmp, info->fragment, size,
info->scratch, info->super.block_size);
if (ret < 0)
@@ -103,7 +99,6 @@ static int flush_fragments(sqfs_info_t *info)
info->super.bytes_used += size;
info->frag_offset = 0;
- info->frag_list = NULL;
info->super.flags &= ~SQFS_FLAG_NO_FRAGMENTS;
info->super.flags |= SQFS_FLAG_ALWAYS_FRAGMENTS;
@@ -118,8 +113,7 @@ static int add_fragment(file_info_t *fi, sqfs_info_t *info, size_t size)
}
fi->fragment_offset = info->frag_offset;
- fi->frag_next = info->frag_list;
- info->frag_list = fi;
+ fi->fragment = info->num_fragments;
memcpy((char *)info->fragment + info->frag_offset, info->block, size);
info->frag_offset += size;
diff --git a/mkfs/mkfs.h b/mkfs/mkfs.h
index d79b852..c4cd8a1 100644
--- a/mkfs/mkfs.h
+++ b/mkfs/mkfs.h
@@ -49,7 +49,6 @@ typedef struct {
size_t max_fragments;
int file_block_count;
- file_info_t *frag_list;
size_t frag_offset;
id_table_t idtbl;