diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-07-26 22:06:04 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-07-28 16:33:57 +0200 |
commit | 8b633067948a30a0d45091afcced0392dd28d105 (patch) | |
tree | d3cfdd43132da1cee604bd18b3569bd19ba8fdd8 /lib/fstree/mknode.c | |
parent | 0f1bedc90f4cb71d965e99446cf3e72a45909346 (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/mknode.c')
-rw-r--r-- | lib/fstree/mknode.c | 7 |
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; |