summaryrefslogtreecommitdiff
path: root/lib/fstree
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-26 22:06:04 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-28 16:33:57 +0200
commit8b633067948a30a0d45091afcced0392dd28d105 (patch)
treed3cfdd43132da1cee604bd18b3569bd19ba8fdd8 /lib/fstree
parent0f1bedc90f4cb71d965e99446cf3e72a45909346 (diff)
Add fragment and block checksum fields to file_info_t
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/fstree')
-rw-r--r--lib/fstree/mknode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/fstree/mknode.c b/lib/fstree/mknode.c
index c6572fe..18602e4 100644
--- a/lib/fstree/mknode.c
+++ b/lib/fstree/mknode.c
@@ -31,7 +31,8 @@ tree_node_t *fstree_mknode(fstree_t *fs, tree_node_t *parent, const char *name,
if ((sb->st_size % fs->block_size) != 0)
++block_count;
- size += sizeof(*n->data.file) + block_count * sizeof(uint32_t);
+ size += sizeof(*n->data.file);
+ size += block_count * sizeof(n->data.file->blocks[0]);
if (extra != NULL)
size += strlen(extra) + 1;
break;
@@ -64,8 +65,8 @@ tree_node_t *fstree_mknode(fstree_t *fs, tree_node_t *parent, const char *name,
if (extra == NULL)
break;
- ptr = (char *)n->data.file->blocksizes;
- ptr += block_count * sizeof(uint32_t);
+ ptr = (char *)n->data.file->blocks;
+ ptr += block_count * sizeof(n->data.file->blocks[0]);
n->data.file->input_file = ptr;
strcpy(n->data.file->input_file, extra);
break;