aboutsummaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-19 20:05:13 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-19 20:05:13 +0100
commit4a091b656c0861e3f9335c38af25040cb3ff03c8 (patch)
tree263ee5a322bd263125ae07ef40ef5fed31812b29 /mkfs
parent001d3dc914d19b3d85aa04f2a042837cef4af0e4 (diff)
Cleanup: remove the payload pointers from sqfs_inode_generic_t
There are 3 types of extra payload: - Directory index - File block sizes - Symlink target This commit removes the type specific pointers and modifies the code to use the payload area directly. To simplify the file block case and mitigate alignment issues, the type of the extra field is changed to sqfs_u32. For symlink target, the extra field can simply be cast to a character pointer (it had to be cast anyway for most uses). For block sizes, probably the most common usecase, it can be used as is. For directory indices, there is a helper function anyway. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/mkfs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 213fb36..b5d3443 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -109,7 +109,6 @@ static int pack_files(sqfs_data_writer_t *data, fstree_t *fs,
return -1;
}
- inode->block_sizes = (sqfs_u32 *)inode->extra;
inode->base.type = SQFS_INODE_FILE;
sqfs_inode_set_file_size(inode, filesize);
sqfs_inode_set_frag_location(inode, 0xFFFFFFFF, 0xFFFFFFFF);