summaryrefslogtreecommitdiff
path: root/lib/sqfshelper/tree_node_from_inode.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-14 17:57:58 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-14 18:06:04 +0200
commite165fb864fe86eda398a14713cf38924cc537adc (patch)
tree217b80d56b1d8c21f3387390db06e525b2f9f064 /lib/sqfshelper/tree_node_from_inode.c
parentf57814332a69bebc40e25e6537a3c08fc9e18f97 (diff)
Remove fstree file flags
As a side effect, this requires the data writer to keep track of statistics. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfshelper/tree_node_from_inode.c')
-rw-r--r--lib/sqfshelper/tree_node_from_inode.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/sqfshelper/tree_node_from_inode.c b/lib/sqfshelper/tree_node_from_inode.c
index fee191b..f5b643c 100644
--- a/lib/sqfshelper/tree_node_from_inode.c
+++ b/lib/sqfshelper/tree_node_from_inode.c
@@ -38,18 +38,10 @@ static size_t compute_size(sqfs_inode_generic_t *inode, const char *name)
return size;
}
-static void copy_block_sizes(sqfs_inode_generic_t *inode, tree_node_t *out,
- size_t block_size)
+static void copy_block_sizes(sqfs_inode_generic_t *inode, tree_node_t *out)
{
size_t i;
- if ((out->data.file->size % block_size) != 0) {
- if (out->data.file->fragment != 0xFFFFFFFF &&
- out->data.file->fragment_offset != 0xFFFFFFFF) {
- out->data.file->flags |= FILE_FLAG_HAS_FRAGMENT;
- }
- }
-
out->name += inode->num_file_blocks *
sizeof(out->data.file->block_size[0]);
@@ -59,8 +51,7 @@ static void copy_block_sizes(sqfs_inode_generic_t *inode, tree_node_t *out,
tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode,
const sqfs_id_table_t *idtbl,
- const char *name,
- size_t block_size)
+ const char *name)
{
tree_node_t *out;
@@ -112,7 +103,7 @@ tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode,
out->data.file->fragment_offset =
inode->data.file.fragment_offset;
- copy_block_sizes(inode, out, block_size);
+ copy_block_sizes(inode, out);
break;
case SQFS_INODE_EXT_FILE:
out->data.file = (file_info_t *)out->payload;
@@ -125,7 +116,7 @@ tree_node_t *tree_node_from_inode(sqfs_inode_generic_t *inode,
out->data.file->fragment_offset =
inode->data.file_ext.fragment_offset;
- copy_block_sizes(inode, out, block_size);
+ copy_block_sizes(inode, out);
break;
case SQFS_INODE_SLINK:
case SQFS_INODE_EXT_SLINK: